mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 23:44:50 -04:00
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.
This commit is contained in:
parent
c7446906bd
commit
126a15794c
16 changed files with 29 additions and 50 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue