mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 14:20:23 +00:00
Make sure we return a JSON object when returning the values of specif…
…ic keys from a push rule
This commit is contained in:
parent
fb9b5b6f4a
commit
15c2ac2cac
1 changed files with 3 additions and 1 deletions
|
@ -324,7 +324,9 @@ def _filter_ruleset_with_path(ruleset, path):
|
|||
|
||||
attr = path[0]
|
||||
if attr in the_rule:
|
||||
return the_rule[attr]
|
||||
# Make sure we return a JSON object as the attribute may be a
|
||||
# JSON value.
|
||||
return {attr: the_rule[attr]}
|
||||
else:
|
||||
raise UnrecognizedRequestError()
|
||||
|
||||
|
|
Loading…
Reference in a new issue