Fix develop because I broke it :( (#3535)

pull/3540/head
Amber Brown 2018-07-14 09:51:00 +10:00 committed by GitHub
parent 8532953c04
commit 8a4f05fefb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

0
changelog.d/3535.misc Normal file
View File

View File

@ -77,11 +77,11 @@ class PushRuleRestServlet(ClientV1RestServlet):
before = parse_string(request, "before")
if before:
before = _namespaced_rule_id(spec, before[0])
before = _namespaced_rule_id(spec, before)
after = parse_string(request, "after")
if after:
after = _namespaced_rule_id(spec, after[0])
after = _namespaced_rule_id(spec, after)
try:
yield self.store.add_push_rule(

View File

@ -78,6 +78,9 @@ class PaginationConfig(object):
limit = parse_integer(request, "limit", default=default_limit)
if limit and limit < 0:
raise SynapseError(400, "Limit must be 0 or above")
try:
return PaginationConfig(from_tok, to_tok, direction, limit)
except Exception: