Added X-Total-Count test asserts

Fixed issue with incorrect total count for vendors
This commit is contained in:
Donkie
2023-09-08 22:01:49 +02:00
parent 4e0851e7c3
commit a4d14c5b52
6 changed files with 18 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ async def find(
total_count = None
if limit is not None:
total_count_stmt = stmt.with_only_columns(func.count())
total_count_stmt = stmt.with_only_columns(func.count(), maintain_column_froms=True)
total_count = (await db.execute(total_count_stmt)).scalar()
stmt = stmt.offset(offset).limit(limit)