summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-31 17:24:42 +0100
committerErik Johnston <erik@matrix.org>2016-05-31 17:24:42 +0100
commit219923eaad8aa84d0d02f5dffb3ec9339e6a0d4a (patch)
treea6281eebe653c96dc4181adc023e1a89f1c9b6c7
parentMerge branch 'erikj/push_rules_cache' of github.com:matrix-org/synapse into e... (diff)
parentForce boolean (diff)
downloadsynapse-219923eaad8aa84d0d02f5dffb3ec9339e6a0d4a.tar.xz
Merge branch 'erikj/push_rules_cache' of github.com:matrix-org/synapse into erikj/timings
-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