Skip to content

Commit b4ee9de

Browse files
committed
paginate once
1 parent a8a24b1 commit b4ee9de

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

server/mergin/sync/public_api_v2_controller.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,9 @@ def list_workspace_projects(workspace_id, page, per_page, order_params=None, q=N
443443
)
444444
projects = projects.order_by(*order_by_params)
445445

446-
result = projects.paginate(page, per_page).items
447-
total = projects.paginate(page, per_page).total
446+
pagination = projects.paginate(page, per_page)
447+
result = pagination.items
448+
total = pagination.total
448449

449450
data = ProjectSchemaV2(many=True).dump(result)
450451
return jsonify(projects=data, count=total, page=page, per_page=per_page), 200

0 commit comments

Comments
 (0)