diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-10-14 08:30:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-14 12:30:05 +0000 |
commit | 126a15794c95002560709283640ad412636b29b8 (patch) | |
tree | dca3e2380f4bec49b5dcff4407bc6405eef05692 /synapse/handlers/pagination.py | |
parent | Set LD_PRELOAD to load jemalloc in Dockerfile-workers. (#14182) (diff) | |
download | synapse-126a15794c95002560709283640ad412636b29b8.tar.xz |
Do not allow a None-limit on PaginationConfig. (#14146)
The callers either set a default limit or manually handle a None-limit later on (by setting a default value). Update the callers to always instantiate PaginationConfig with a default limit and then assume the limit is non-None.
Diffstat (limited to 'synapse/handlers/pagination.py')
-rw-r--r-- | synapse/handlers/pagination.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py index 1f83bab836..a4ca9cb8b4 100644 --- a/synapse/handlers/pagination.py +++ b/synapse/handlers/pagination.py @@ -458,11 +458,6 @@ class PaginationHandler: # `/messages` should still works with live tokens when manually provided. assert from_token.room_key.topological is not None - if pagin_config.limit is None: - # This shouldn't happen as we've set a default limit before this - # gets called. - raise Exception("limit not set") - room_token = from_token.room_key async with self.pagination_lock.read(room_id): |