summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-05-12 18:59:24 -0400
committerRuben Pollan <meskio@sindominio.net>2017-01-26 22:39:34 +0100
commit800c2167ca332e7b59072a1c928cbb9ba996f369 (patch)
treef739a1a0278d8c2d8371111b6287e1b16e0d27e3 /src
parentab8d10520a6ecb01ac0357a397697df3ed50d331 (diff)
[style] improve readability
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 f17466d..50275ca 100644
--- a/src/leap/mx/couchdbhelper.py
+++ b/src/leap/mx/couchdbhelper.py
@@ -100,7 +100,8 @@ class ConnectedCouchDB(client.CouchDB):
pubkey = None
if result["rows"]:
doc = result["rows"][0]["doc"]
- if "enabled" not in doc or doc["enabled"]:
+ user_enabled = doc.get('enabled', True)
+ if user_enabled:
uuid = doc["user_id"]
if "keys" in doc:
pubkey = doc["keys"]["pgp"]