summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-31 15:37:53 +0100
committerErik Johnston <erik@matrix.org>2016-05-31 15:37:53 +0100
commit4efa389299bfef694af41b642ba9623a8be5df93 (patch)
treee660329e9e3d304e8ea514abfaa20ddd1b2a630d /synapse
parentAdd caches to bulk_get_push_rules* (diff)
downloadsynapse-4efa389299bfef694af41b642ba9623a8be5df93.tar.xz
Fix GET /push_rules
Diffstat (limited to 'synapse')
-rw-r--r--synapse/rest/client/v1/push_rule.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py
index 02d837ee6a..c135353aab 100644
--- a/synapse/rest/client/v1/push_rule.py
+++ b/synapse/rest/client/v1/push_rule.py
@@ -132,6 +132,9 @@ class PushRuleRestServlet(ClientV1RestServlet):
 
         enabled_map = yield self.store.get_push_rules_enabled_for_user(user_id)
 
+        rawrules = {k: v for k, v in rawrules.item() if k is not None}
+        enabled_map = {k: v for k, v in enabled_map.item() if k is not None}
+
         rules = format_push_rules_for_user(requester.user, rawrules, enabled_map)
 
         path = request.postpath[1:]