diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-26 16:03:32 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-26 16:03:32 +0100 |
commit | 6d1dea337b8ae64ddfe4c1627014d09963388b0d (patch) | |
tree | c5cefd5b0334185780ffa8d391cb2d2f70c003af /synapse/rest/client/v1/push_rule.py | |
parent | Changelog (diff) | |
parent | changelog (diff) | |
download | synapse-6d1dea337b8ae64ddfe4c1627014d09963388b0d.tar.xz |
Merge branch 'release-v0.9.1' of github.com:matrix-org/synapse v0.9.1
Diffstat (limited to 'synapse/rest/client/v1/push_rule.py')
-rw-r--r-- | synapse/rest/client/v1/push_rule.py | 13 |
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': {}} |