summary refs log tree commit diff
path: root/synapse/rest/client/v1
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-02-25 15:13:18 +0000
committerMark Haines <mjark@negativecurvature.net>2016-02-25 15:13:18 +0000
commitfaa3d172ab613fb3f3a9a922a4a8f6bcef6974dd (patch)
tree3831890dab093bb4eef5106cc5f5432078be37fb /synapse/rest/client/v1
parentMerge pull request #605 from matrix-org/markjh/dead_code (diff)
parentMake sure we return a JSON object when returning the values of specif… (diff)
downloadsynapse-faa3d172ab613fb3f3a9a922a4a8f6bcef6974dd.tar.xz
Merge pull request #606 from matrix-org/markjh/get_enabled
Make sure we return a JSON object when returning the values of specif…

…ic keys from a push rule
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r--synapse/rest/client/v1/push_rule.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py
index 6c8f09e898..d26e4cde3e 100644
--- a/synapse/rest/client/v1/push_rule.py
+++ b/synapse/rest/client/v1/push_rule.py
@@ -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()