Added backend supported csv/json export functionality

This commit is contained in:
Donkie
2024-10-27 12:36:39 +01:00
parent a95ddcedd1
commit 86f69d470f
6 changed files with 165 additions and 4 deletions

View File

@@ -198,7 +198,10 @@ async def find( # noqa: C901, PLR0912
elif order == SortOrder.DESC:
stmt = stmt.order_by(*(f.desc() for f in sorts))
rows = await db.execute(stmt)
rows = await db.execute(
stmt,
execution_options={"populate_existing": True},
)
result = list(rows.unique().scalars().all())
if total_count is None:
total_count = len(result)