From dce0cd8725e68e6984c8b54a2cc108e4f8c9df7a Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 30 Sep 2020 16:55:25 +0300 Subject: Fix StopIteration error thrown in view collections page * wqflask/wqflask/user_session.py (user_id): Use byte-string when fetching user_id. See: https://github.com/genenetwork/genenetwork2/pull/422#issuecomment-701082458 --- wqflask/wqflask/user_session.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/user_session.py b/wqflask/wqflask/user_session.py index c1f38396..9f4c5458 100644 --- a/wqflask/wqflask/user_session.py +++ b/wqflask/wqflask/user_session.py @@ -127,10 +127,10 @@ class UserSession(object): @property def user_id(self): """Shortcut to the user_id""" - if 'user_id' not in self.record: - self.record['user_id'] = str(uuid.uuid4()) + if b'user_id' not in self.record: + self.record[b'user_id'] = str(uuid.uuid4()) - return self.record['user_id'] + return self.record[b'user_id'] @property def redis_user_id(self): -- cgit v1.2.3