mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-05 06:08:46 -05:00
Squashed commit of the following:
commit f8f08ae337
Author: smilerz <smilerz@gmail.com>
Date: Wed Sep 6 10:27:43 2023 -0500
respect ignore_shopping flag
This commit is contained in:
@@ -176,7 +176,7 @@ class RecipeShoppingEditor():
|
||||
if not ingredients:
|
||||
return
|
||||
elif isinstance(ingredients, list):
|
||||
ingredients = Ingredient.objects.filter(id__in=ingredients)
|
||||
ingredients = Ingredient.objects.filter(id__in=ingredients, food__ignore_shopping=False)
|
||||
existing = self._shopping_list_recipe.entries.filter(ingredient__in=ingredients).values_list('ingredient__pk', flat=True)
|
||||
add_ingredients = ingredients.exclude(id__in=existing)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user