MEDIUM: POST /recipes/saved/collections returns 500 — missing member_count in INSERT RETURNING #94
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#94
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
Creating a recipe collection always returns 500. The
create_collectionstore method returns a rawINSERT ... RETURNING *result, butCollectionSummaryrequires amember_countfield that only exists in theget_collectionsaggregate query.Root Cause
app/db/store.py:RETURNING *gives backid, name, description, created_at, updated_at— nomember_count.app/models/schemas/saved_recipe.py:Fix
After inserting, fetch with the count query:
Verified
POST /api/v1/recipes/saved/collectionsreturns HTTP 500.