diff options
author | Denis Kasak <dkasak@termina.org.uk> | 2024-06-24 15:12:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 15:12:14 +0200 |
commit | 700d2cc4a0d457642edb43bc3714d212f15d797f (patch) | |
tree | fc338a7d0cd2649b3dba0992e9e8c59e2ac1c349 /synapse/rest/admin/users.py | |
parent | Bump lazy_static from 1.4.0 to 1.5.0 (#17355) (diff) | |
download | synapse-700d2cc4a0d457642edb43bc3714d212f15d797f.tar.xz |
Tidy up integer parsing (#17339)
The parse_integer function was previously made to reject negative values by default in https://github.com/element-hq/synapse/pull/16920, but the documentation stated otherwise. This fixes the documentation and also: - Removes explicit negative=False parameters from call sites. - Brings the negative default of parse_integer_from_args in alignment with parse_integer.
Diffstat (limited to 'synapse/rest/admin/users.py')
-rw-r--r-- | synapse/rest/admin/users.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py index 5bf12c4979..f7cb9e02cc 100644 --- a/synapse/rest/admin/users.py +++ b/synapse/rest/admin/users.py @@ -90,8 +90,8 @@ class UsersRestServletV2(RestServlet): async def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]: await assert_requester_is_admin(self.auth, request) - start = parse_integer(request, "from", default=0, negative=False) - limit = parse_integer(request, "limit", default=100, negative=False) + start = parse_integer(request, "from", default=0) + limit = parse_integer(request, "limit", default=100) user_id = parse_string(request, "user_id") name = parse_string(request, "name", encoding="utf-8") |