diff options
author | David Baker <dave@matrix.org> | 2015-03-04 14:17:59 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-03-04 14:17:59 +0000 |
commit | 2a45f3d448439ebef047cc09ac62bccfa3ebac5a (patch) | |
tree | a8bf46cb97a22862416996c2fc23db60336df035 | |
parent | s/user_name/user/ as per mjark's comment (diff) | |
download | synapse-2a45f3d448439ebef047cc09ac62bccfa3ebac5a.tar.xz |
Use if not results rather than len, as per feedback.
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/push_rule.py | 2 |
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]) |