aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/model.py
diff options
context:
space:
mode:
authorpjotrp2015-11-18 11:19:01 +0100
committerpjotrp2015-11-18 11:19:01 +0100
commitcb0f10fc4850b6b06f2237b532317a5c6668584a (patch)
treed143662ecceac5e05bd06afee4c87b2beb88859b /wqflask/wqflask/model.py
parent28ec342362ba068b3d0b5b9a302bc279d251f160 (diff)
parent0310301b30c59eca45235cd1bd1ff8e15923950a (diff)
downloadgenenetwork2-cb0f10fc4850b6b06f2237b532317a5c6668584a.tar.gz
Merge branch 'master' of https://github.com/zsloan/genenetwork2 into zsloan
Diffstat (limited to 'wqflask/wqflask/model.py')
-rwxr-xr-xwqflask/wqflask/model.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/wqflask/wqflask/model.py b/wqflask/wqflask/model.py
index fa8c1aab..5ea32e1f 100755
--- a/wqflask/wqflask/model.py
+++ b/wqflask/wqflask/model.py
@@ -172,8 +172,11 @@ class UserCollection(Base):
@property
def num_members(self):
- print("members are:", json.loads(self.members))
- return len(json.loads(self.members))
+ try:
+ return len(json.loads(self.members))
+ except:
+ return 0
+
#@property
#def display_num_members(self):
@@ -194,4 +197,4 @@ def display_collapsible(number):
def user_uuid():
"""Unique cookie for a user"""
user_uuid = request.cookies.get('user_uuid')
- \ No newline at end of file
+