This commit is contained in:
smilerz
2022-01-13 16:00:59 -06:00
parent 3aa7f6a367
commit e313481fc8
3 changed files with 4 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ def shopping_helper(qs, request):
return qs.order_by(*supermarket_order).select_related('unit', 'food', 'ingredient', 'created_by', 'list_recipe', 'list_recipe__mealplan', 'list_recipe__recipe')
# TODO refactor as class
def list_from_recipe(list_recipe=None, recipe=None, mealplan=None, servings=None, ingredients=None, created_by=None, space=None, append=False):
"""
Creates ShoppingListRecipe and associated ShoppingListEntrys from a recipe or a meal plan with a recipe