Fix: Keyset-Pagination use_keyset unabhaengig von cursor (erste Seite ohne cursor)
This commit is contained in:
@@ -182,9 +182,9 @@ async def list_contacts(
|
||||
Contact.search_tsv.op("@@")(func.plainto_tsquery("german", search))
|
||||
)
|
||||
|
||||
# Keyset-Pagination: filter by cursor if provided
|
||||
use_keyset = cursor is not None and sort_by == "id" and sort_order == "asc"
|
||||
if use_keyset:
|
||||
# Keyset-Pagination: use keyset when sorting by id (independent of cursor)
|
||||
use_keyset = sort_by == "id" and sort_order == "asc"
|
||||
if use_keyset and cursor is not None:
|
||||
base = base.where(Contact.id > uuid.UUID(cursor))
|
||||
|
||||
# Count
|
||||
|
||||
Reference in New Issue
Block a user