Skip to content

Commit

Permalink
fix(api): page - 1 that returned the wrong page
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez committed Jan 4, 2023
1 parent 3ad6c49 commit c53ad3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/gn_module_monitoring/utils/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def paginate(query: Query, schema: Schema, limit: int, page: int) -> Response:
result = query.paginate(page=page, error_out=False, per_page=limit)
pagination_schema = paginate_schema(schema)
data = pagination_schema().dump(
dict(items=result.items, count=result.total, limit=limit, offset=page - 1)
dict(items=result.items, count=result.total, limit=limit, offset=page)
)
return jsonify(data)

Expand Down

0 comments on commit c53ad3a

Please sign in to comment.