Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Bulk Add Recipes to Shopping List #5054

Conversation

michael-genson
Copy link
Collaborator

What this PR does / why we need it:

(REQUIRED)

This PR updates the endpoint for adding a recipe to a shopping list to accept multiple recipes. This improves speed when adding multiple recipes from the meal planner, and fixes a bug where items aren't merged properly due to race conditions.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #3417

Special notes for your reviewer:

(fill-in or delete this section)

I kept the old endpoint + signature so existing integrations don't break, but I marked it as deprecated in the docs. In a future version we can just get rid of it.

Testing

(fill-in or delete this section)

Updated pytest with the new route and added a new test for a new edgecase. I also tested the frontend any time that endpoint is called (from the meal planner, from a recipe, from the shopping list page).

@Kuchenpirat Kuchenpirat self-assigned this Feb 27, 2025
Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a little unused import that slipped through

@Kuchenpirat Kuchenpirat enabled auto-merge (squash) February 27, 2025 13:49
@Kuchenpirat Kuchenpirat merged commit 716c85c into mealie-recipes:mealie-next Feb 27, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - Shopping list items of the same type are not consolidated
2 participants