diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-09-26 10:21:00 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-09-26 10:21:00 -0300 |
commit | d8893584886a593dd6ddcfa1a6930288c7fd8ecc (patch) | |
tree | ea78d499b35991a7e1e51ebbb8aee6fea6286ff1 /src/leap/mx/couchdbhelper.py | |
parent | 2b6ed340fd0f2f84431082890857dd5e7de63831 (diff) | |
parent | 78e8f04076c4f915b8fbdad037a863487580da5a (diff) |
Merge branch 'release-0.6.0'0.6.0
Diffstat (limited to 'src/leap/mx/couchdbhelper.py')
-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 |