Fix Tandoor pagination: use page/page_size instead of limit/offset

Tandoor's /api/recipe/ endpoint uses Django REST Framework's
PageNumberPagination (page + page_size), not LimitOffsetPagination.
The limit/offset params were silently ignored, returning all recipes
on every page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 08:50:49 +01:00
parent 4a1ebfaf4e
commit bb89d97716
+2 -2
View File
@@ -87,8 +87,8 @@ class TandoorClient:
Returns {"items": [...], "page": int, "per_page": int, "total": int}. Returns {"items": [...], "page": int, "per_page": int, "total": int}.
""" """
params: dict = { params: dict = {
"limit": per_page, "page": page,
"offset": (page - 1) * per_page, "page_size": per_page,
"format": "json", "format": "json",
} }
if search: if search: