aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-09-12 06:11:52 +0300
committerFrederick Muriuki Muriithi2022-09-12 06:11:52 +0300
commit228a5545adb47fee0de22e55536ee612aab9be66 (patch)
tree00a8bb3b2a55ec5f45d786795eec556c80ee1c98 /wqflask
parent2f3c69472314dd0622eb1253d7e64476f5d74df4 (diff)
downloadgenenetwork2-228a5545adb47fee0de22e55536ee612aab9be66.tar.gz
Check data is truthy before indexing into it.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/rust_correlation.py2
1 files changed, 1 insertions, 1 deletions
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")