summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-09-08 14:50:24 -0300
committerTomás Touceda <chiiph@leap.se>2014-09-08 14:50:24 -0300
commit5f3f5e47f44876d4da82623b6585d30618ed40df (patch)
treeafce9432136e8026510440eb5201e135319b2f8e /src
parentea64e4655a27f36df830c6b7dee6f8aeb476dbb4 (diff)
parenta5b1d1cdd6bbe224d5e1519024d705e1b0d4fbf4 (diff)
Merge remote-tracking branch 'bwgpro/user_id_wont_break_mx' into develop
Diffstat (limited to 'src')
-rw-r--r--src/leap/mx/couchdbhelper.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/mx/couchdbhelper.py b/src/leap/mx/couchdbhelper.py
index 41604ba..f20f1dd 100644
--- a/src/leap/mx/couchdbhelper.py
+++ b/src/leap/mx/couchdbhelper.py
@@ -171,7 +171,11 @@ class ConnectedCouchDB(client.CouchDB):
:rtype: str or None
"""
for row in result["rows"]:
- if row["doc"]["user_id"] == uuid:
+ user_id = row["doc"].get("user_id")
+ if not user_id:
+ print("User %s is in an inconsistent state")
+ continue
+ if user_id == uuid:
return row["value"]
return None