mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-17 15:31:19 +01:00
SYN-390: Don't modify the dictionary returned from the data store
This commit is contained in:
parent
ee49098843
commit
a0bebeda8b
1 changed files with 7 additions and 4 deletions
|
@ -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 = []
|
||||
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(rawrules, user)
|
||||
ruleslist = baserules.list_with_base_rules(ruleslist, user)
|
||||
|
||||
rules = {'global': {}, 'device': {}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue