aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2021-03-16 17:23:45 +0000
committerzsloan2021-03-16 17:23:45 +0000
commit02b14ccc55978742cd115f3c80bf8ef41ac77ae7 (patch)
tree159002dc1f68fcdc16226181298309c06040b61a /wqflask
parent7004219e51a6053a03ec4a997d759c52ed36bdfe (diff)
downloadgenenetwork2-02b14ccc55978742cd115f3c80bf8ef41ac77ae7.tar.gz
Fixed encoding to make get_user_groups work properly, since the user IDs for groups in Redis are stored as strings
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/utility/redis_tools.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/utility/redis_tools.py b/wqflask/utility/redis_tools.py
index 236cc755..d05de923 100644
--- a/wqflask/utility/redis_tools.py
+++ b/wqflask/utility/redis_tools.py
@@ -133,8 +133,8 @@ def get_user_groups(user_id):
for key in groups_list:
try:
group_ob = json.loads(groups_list[key])
- group_admins = set(group_ob['admins'])
- group_members = set(group_ob['members'])
+ group_admins = set([this_admin.encode('utf-8') if this_admin else None for this_admin in group_ob['admins']])
+ group_members = set([this_member.encode('utf-8') if this_member else None for this_member in group_ob['members']])
if user_id in group_admins:
admin_group_ids.append(group_ob['id'])
elif user_id in group_members: