mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-20 20:04:19 -05:00
Merge pull request #165 from matrix-org/bugs/SYN-390
SYN-390: Don't modify the dictionary returned from the data store
This commit is contained in:
commit
9ba3c1ede4
@ -118,11 +118,14 @@ class PushRuleRestServlet(ClientV1RestServlet):
|
|||||||
user.to_string()
|
user.to_string()
|
||||||
)
|
)
|
||||||
|
|
||||||
for r in rawrules:
|
ruleslist = []
|
||||||
r["conditions"] = json.loads(r["conditions"])
|
for rawrule in rawrules:
|
||||||
r["actions"] = json.loads(r["actions"])
|
rule = dict(rawrule)
|
||||||
|
rule["conditions"] = json.loads(rawrule["conditions"])
|
||||||
|
rule["actions"] = json.loads(rawrule["actions"])
|
||||||
|
ruleslist.append(rule)
|
||||||
|
|
||||||
ruleslist = baserules.list_with_base_rules(rawrules, user)
|
ruleslist = baserules.list_with_base_rules(ruleslist, user)
|
||||||
|
|
||||||
rules = {'global': {}, 'device': {}}
|
rules = {'global': {}, 'device': {}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user