summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-05-12 18:59:24 -0400
committerKali Kaneko <kali@leap.se>2016-05-16 13:15:29 -0400
commitf7d263fc2dbcdae70e1b5eecf9e757b2da232153 (patch)
treef739a1a0278d8c2d8371111b6287e1b16e0d27e3
parent69a4fbcf1c8069a713c9d59b0a416da9a3b2e2c0 (diff)
[style] improve readability
-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"]