HIGH: export/json calls get_saved_recipes(1000, 0) with wrong argument types #92
Labels
No labels
accessibility
backlog
beta-feedback
bug
duplicate
enhancement
feature-request
help wanted
invalid
needs-design
needs-triage
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/kiwi#92
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GET /api/v1/export/jsonalways exports an empty saved recipes list because it passes the wrong arguments toget_saved_recipes.Root Cause
app/api/endpoints/export.py:But
Store.get_saved_recipessignature is:So
1000is passed assort_by(an invalid sort key, silently falls through to the defaultsaved_at DESC) and0is passed ascollection_id. Because0 is not None, the function enters the collection-filtered branch and returns only saved recipes in collection ID 0, which is always empty.Fix
Or be explicit:
The limit/offset parameters do not exist in
get_saved_recipes— they belong to the oldlist_receiptsAPI. The export route should just return all saved recipes.