summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-31 15:44:08 +0100
committerErik Johnston <erik@matrix.org>2016-05-31 15:44:08 +0100
commitcca0093fa96cfec0566ff790ef990fad8b6763bb (patch)
tree43053dc8ea0d49eb8dfcb8a14135061dbf10c40d /synapse/storage
parentFix GET /push_rules (diff)
downloadsynapse-cca0093fa96cfec0566ff790ef990fad8b6763bb.tar.xz
Change fix
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/push_rule.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index f285f59afd..65c20e8900 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -66,7 +66,10 @@ class PushRuleStore(SQLBaseStore):
         if not user_ids:
             defer.returnValue({})
 
-        results = {}
+        results = {
+            user_id: []
+            for user_id in user_ids
+        }
 
         rows = yield self._simple_select_many_batch(
             table="push_rules",
@@ -90,7 +93,10 @@ class PushRuleStore(SQLBaseStore):
         if not user_ids:
             defer.returnValue({})
 
-        results = {}
+        results = {
+            user_id: []
+            for user_id in user_ids
+        }
 
         rows = yield self._simple_select_many_batch(
             table="push_rules_enable",