aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/redis_tools.py
diff options
context:
space:
mode:
authorzsloan2020-07-22 17:46:37 -0500
committerzsloan2020-07-22 17:46:37 -0500
commit81c35e99a7ff808bf2fcf1f5e19631adf07d42e8 (patch)
tree0efcd9fb846a9301a6ad073c5ab7b1f717e2909f /wqflask/utility/redis_tools.py
parent1775b713478bff182e0047dd5f92b751d7e68a20 (diff)
downloadgenenetwork2-81c35e99a7ff808bf2fcf1f5e19631adf07d42e8.tar.gz
It should add new resources to Redis automatically now
Diffstat (limited to 'wqflask/utility/redis_tools.py')
-rw-r--r--wqflask/utility/redis_tools.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/wqflask/utility/redis_tools.py b/wqflask/utility/redis_tools.py
index 6c912a23..1377a564 100644
--- a/wqflask/utility/redis_tools.py
+++ b/wqflask/utility/redis_tools.py
@@ -264,17 +264,14 @@ def get_resources():
return resource_list
def get_resource_id(dataset, trait_id=None):
+ resource_id = False
if dataset.type == "Publish":
if trait_id:
resource_id = hmac.hmac_creation("{}:{}:{}".format('dataset-publish', dataset.id, trait_id))
- else:
- return False
elif dataset.type == "ProbeSet":
resource_id = hmac.hmac_creation("{}:{}".format('dataset-probeset', dataset.id))
elif dataset.type == "Geno":
resource_id = hmac.hmac_creation("{}:{}".format('dataset-geno', dataset.id))
- else:
- return False
return resource_id