summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-26 10:22:41 +0100
committerErik Johnston <erik@matrix.org>2015-05-26 10:22:41 +0100
commit45fffe8cbed41dfe5c263015eb8f3cca19d8f1b8 (patch)
tree9598bfe75f8553ce5da7f30b41be260572760406
parentBump version (diff)
parentMerge pull request #165 from matrix-org/bugs/SYN-390 (diff)
downloadsynapse-45fffe8cbed41dfe5c263015eb8f3cca19d8f1b8.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.9.1
-rw-r--r--synapse/rest/client/v1/push_rule.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py
index d4e7ab2202..bd759a2589 100644
--- a/synapse/rest/client/v1/push_rule.py
+++ b/synapse/rest/client/v1/push_rule.py
@@ -118,11 +118,14 @@ class PushRuleRestServlet(ClientV1RestServlet):
             user.to_string()
         )
 
-        for r in rawrules:
-            r["conditions"] = json.loads(r["conditions"])
-            r["actions"] = json.loads(r["actions"])
-
-        ruleslist = baserules.list_with_base_rules(rawrules, user)
+        ruleslist = []
+        for rawrule in rawrules:
+            rule = dict(rawrule)
+            rule["conditions"] = json.loads(rawrule["conditions"])
+            rule["actions"] = json.loads(rawrule["actions"])
+            ruleslist.append(rule)
+
+        ruleslist = baserules.list_with_base_rules(ruleslist, user)
 
         rules = {'global': {}, 'device': {}}