aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/user_manager.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wqflask/wqflask/user_manager.py b/wqflask/wqflask/user_manager.py
index fd1d56ff..e1920f4e 100644
--- a/wqflask/wqflask/user_manager.py
+++ b/wqflask/wqflask/user_manager.py
@@ -122,7 +122,8 @@ class AnonUser(object):
return collections
def import_traits_to_user(self):
- collections_list = json.loads(Redis.get(self.key))
+ result = Redis.get(self.key)
+ collections_list = json.loads(result if result else "[]")
for collection in collections_list:
uc = model.UserCollection()
uc.name = collection['name']