summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-06-01 18:07:48 +0100
committerErik Johnston <erik@matrix.org>2016-06-01 18:07:48 +0100
commita04a2d043ca722442b94065fcafdd650dd17476a (patch)
tree473c79369844a60e02b543b543d329ca939c1259
parentMerge pull request #806 from matrix-org/erikj/hash_cache (diff)
parentForce boolean (diff)
downloadsynapse-a04a2d043ca722442b94065fcafdd650dd17476a.tar.xz
Merge pull request #807 from matrix-org/erikj/push_rules_cache
Ensure we always return boolean in push rules
Diffstat (limited to '')
-rw-r--r--synapse/storage/push_rule.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index 216a8bf69c..ebb97c8474 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -106,7 +106,8 @@ class PushRuleStore(SQLBaseStore):
             desc="bulk_get_push_rules_enabled",
         )
         for row in rows:
-            results.setdefault(row['user_name'], {})[row['rule_id']] = row['enabled']
+            enabled = bool(row['enabled'])
+            results.setdefault(row['user_name'], {})[row['rule_id']] = enabled
         defer.returnValue(results)
 
     @defer.inlineCallbacks