diff options
Diffstat (limited to 'src/leap/mx')
-rw-r--r-- | src/leap/mx/couchdbhelper.py | 6 |
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 |