Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Make sure we return a JSON object when returning the values of specif…
Browse files Browse the repository at this point in the history
…ic keys from a push rule
  • Loading branch information
NegativeMjark authored and review.rocks committed Feb 25, 2016
1 parent fb9b5b6 commit 15c2ac2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synapse/rest/client/v1/push_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 15c2ac2

Please sign in to comment.