aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/redis_tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/utility/redis_tools.py')
-rw-r--r--wqflask/utility/redis_tools.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/utility/redis_tools.py b/wqflask/utility/redis_tools.py
index 9d09a66b..8a5f95ee 100644
--- a/wqflask/utility/redis_tools.py
+++ b/wqflask/utility/redis_tools.py
@@ -280,7 +280,10 @@ def get_resource_id(dataset, trait_id=None):
def get_resource_info(resource_id):
resource_info = Redis.hget("resources", resource_id)
- return json.loads(resource_info)
+ if resource_info:
+ return json.loads(resource_info)
+ else:
+ return None
def add_resource(resource_info):
if 'trait' in resource_info['data']: