From 73969bce6019666feff8c2ddb07c57aadd78c24d Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 16 Mar 2021 17:38:08 +0000 Subject: Added try/except to convert owner_id to bytes if necessary --- wqflask/wqflask/resource_manager.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'wqflask') 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'] -- cgit v1.2.3