Fix develop because I broke it :( (#3535)
parent
8532953c04
commit
8a4f05fefb
|
@ -77,11 +77,11 @@ class PushRuleRestServlet(ClientV1RestServlet):
|
||||||
|
|
||||||
before = parse_string(request, "before")
|
before = parse_string(request, "before")
|
||||||
if before:
|
if before:
|
||||||
before = _namespaced_rule_id(spec, before[0])
|
before = _namespaced_rule_id(spec, before)
|
||||||
|
|
||||||
after = parse_string(request, "after")
|
after = parse_string(request, "after")
|
||||||
if after:
|
if after:
|
||||||
after = _namespaced_rule_id(spec, after[0])
|
after = _namespaced_rule_id(spec, after)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
yield self.store.add_push_rule(
|
yield self.store.add_push_rule(
|
||||||
|
|
|
@ -78,6 +78,9 @@ class PaginationConfig(object):
|
||||||
|
|
||||||
limit = parse_integer(request, "limit", default=default_limit)
|
limit = parse_integer(request, "limit", default=default_limit)
|
||||||
|
|
||||||
|
if limit and limit < 0:
|
||||||
|
raise SynapseError(400, "Limit must be 0 or above")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return PaginationConfig(from_tok, to_tok, direction, limit)
|
return PaginationConfig(from_tok, to_tok, direction, limit)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
Loading…
Reference in New Issue