summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-05-13 09:17:30 -0400
committerKali Kaneko <kali@leap.se>2016-05-13 09:17:30 -0400
commit016cfecf4538fa07555fc187676b3c2c078950e2 (patch)
tree021543bdee5b6e0f8ba75314f8067569493af0c5 /src
parentff04cd7ff544154c13e7b80a1e90c16c00ebe695 (diff)
parent69a4fbcf1c8069a713c9d59b0a416da9a3b2e2c0 (diff)
Merge branch 'develop' into release/0.8.x0.8.1release/0.8.x
Diffstat (limited to 'src')
-rw-r--r--src/leap/mx/couchdbhelper.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/leap/mx/couchdbhelper.py b/src/leap/mx/couchdbhelper.py
index e9cf4a4..f17466d 100644
--- a/src/leap/mx/couchdbhelper.py
+++ b/src/leap/mx/couchdbhelper.py
@@ -100,13 +100,14 @@ class ConnectedCouchDB(client.CouchDB):
pubkey = None
if result["rows"]:
doc = result["rows"][0]["doc"]
- if doc["enabled"]:
+ if "enabled" not in doc or doc["enabled"]:
uuid = doc["user_id"]
if "keys" in doc:
pubkey = doc["keys"]["pgp"]
return uuid, pubkey
d.addCallback(_get_uuid_and_pubkey_cbk)
+ d.addErrback(lambda _: (None, None))
return d
def getPubkey(self, uuid):