diff options
author | zsloan | 2021-03-16 17:38:08 +0000 |
---|---|---|
committer | zsloan | 2021-03-16 17:38:08 +0000 |
commit | 73969bce6019666feff8c2ddb07c57aadd78c24d (patch) | |
tree | 4ce7dfac47e74b3ae4f26b0c124817ed8d8e7d20 /wqflask | |
parent | 696585dda43ec238940b2e1cc239028e31684dc3 (diff) | |
download | genenetwork2-73969bce6019666feff8c2ddb07c57aadd78c24d.tar.gz |
Added try/except to convert owner_id to bytes if necessary
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/resource_manager.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wqflask/wqflask/resource_manager.py b/wqflask/wqflask/resource_manager.py index 85cbb2fd..7d51a83d 100644 --- a/wqflask/wqflask/resource_manager.py +++ b/wqflask/wqflask/resource_manager.py @@ -26,6 +26,10 @@ def manage_resource(): owner_display_name = None if owner_id != "none": + try: #ZS: User IDs are sometimes stored in Redis as bytes and sometimes as strings, so this is just to avoid any errors for the time being + owner_id = str.encode(owner_id) + except: + pass owner_info = get_user_by_unique_column("user_id", owner_id) if 'name' in owner_info: owner_display_name = owner_info['full_name'] |