diff options
author | Mark Haines <mjark@negativecurvature.net> | 2016-01-25 21:26:30 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2016-01-25 21:26:30 +0100 |
commit | 7179fdd550ed5aa4cfcf51042f27e3c7435b415c (patch) | |
tree | e84224e33bce2f6ddeb828f0e2b3c16ce1b76928 /synapse/rest/client/v1 | |
parent | Merge pull request #524 from matrix-org/erikj/sync (diff) | |
parent | Add missing yield in push_rules set enabled (diff) | |
download | synapse-7179fdd550ed5aa4cfcf51042f27e3c7435b415c.tar.xz |
Merge pull request #528 from matrix-org/markjh/missing_yield
Add missing yield in push_rules set enabled
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r-- | synapse/rest/client/v1/push_rule.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py index 2272d66dc7..cb3ec23872 100644 --- a/synapse/rest/client/v1/push_rule.py +++ b/synapse/rest/client/v1/push_rule.py @@ -52,7 +52,7 @@ class PushRuleRestServlet(ClientV1RestServlet): content = _parse_json(request) if 'attr' in spec: - self.set_rule_attr(requester.user.to_string(), spec, content) + yield self.set_rule_attr(requester.user.to_string(), spec, content) defer.returnValue((200, {})) try: @@ -228,7 +228,7 @@ class PushRuleRestServlet(ClientV1RestServlet): # bools directly, so let's not break them. raise SynapseError(400, "Value for 'enabled' must be boolean") namespaced_rule_id = _namespaced_rule_id_from_spec(spec) - self.hs.get_datastore().set_push_rule_enabled( + return self.hs.get_datastore().set_push_rule_enabled( user_id, namespaced_rule_id, val ) else: |