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

Make sure we return a JSON object when returning the values of specif… #606

Merged
merged 1 commit into from
Feb 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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