From 228a5545adb47fee0de22e55536ee612aab9be66 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 12 Sep 2022 06:11:52 +0300 Subject: Check data is truthy before indexing into it. --- wqflask/wqflask/correlation/rust_correlation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py index bf81dd11..214a47e7 100644 --- a/wqflask/wqflask/correlation/rust_correlation.py +++ b/wqflask/wqflask/correlation/rust_correlation.py @@ -194,7 +194,7 @@ def compute_top_n_tissue(this_dataset, this_trait, traits, method): dataset_symbols=trait_symbol_dict, dataset_vals=corr_result_tissue_vals_dict) - if data[0]: + if data and data[0]: return run_correlation( data[1], data[0], method, ",", "tissue") -- cgit v1.2.3