summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-03-04 14:17:59 +0000
committerDavid Baker <dave@matrix.org>2015-03-04 14:17:59 +0000
commit2a45f3d448439ebef047cc09ac62bccfa3ebac5a (patch)
treea8bf46cb97a22862416996c2fc23db60336df035
parents/user_name/user/ as per mjark's comment (diff)
downloadsynapse-2a45f3d448439ebef047cc09ac62bccfa3ebac5a.tar.xz
Use if not results rather than len, as per feedback.
-rw-r--r--synapse/storage/push_rule.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index ea865b6abf..bbf322cc84 100644
--- a/synapse/storage/push_rule.py
+++ b/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])