summaryrefslogtreecommitdiff
path: root/src/leap/mx/couchdbhelper.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@futeisha.org>2014-11-11 21:53:25 +0100
committerKali Kaneko <kali@futeisha.org>2014-11-11 21:53:25 +0100
commit20b7b701508bf6e2c9a9cee38db9757dd07e52fe (patch)
tree1101ed78a557bbf41c29e2d6ff00849a45cbc568 /src/leap/mx/couchdbhelper.py
parent0420989d62c7508e31f946ca7b52e98b87cc2bcb (diff)
parentd8893584886a593dd6ddcfa1a6930288c7fd8ecc (diff)
Merge tag '0.6.0' into debian/experimental
Tag leap.mx version 0.6.0
Diffstat (limited to 'src/leap/mx/couchdbhelper.py')
-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