Use if not results rather than len, as per feedback.

pull/4/merge
David Baker 10 years ago
parent 6fab7bd2c1
commit 2a45f3d448
  1. 2
      synapse/storage/push_rule.py

@ -63,7 +63,7 @@ class PushRuleStore(SQLBaseStore):
{'user_name': user_name, 'rule_id': rule_id},
['enabled']
)
if len(results) == 0:
if not results:
defer.returnValue(True)
defer.returnValue(results[0])

Loading…
Cancel
Save