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:
smilerz
2023-09-12 09:47:55 -05:00
parent 847fceaf10
commit a0256b607e
3 changed files with 173 additions and 168 deletions

View File

@ -969,10 +969,11 @@ class RecipeViewSet(viewsets.ModelViewSet):
raise PermissionDenied(detail='Not available in demo', code=None)
obj = self.get_object()
ingredients = request.data.get('ingredients', None)
servings = request.data.get('servings', None)
list_recipe = request.data.get('list_recipe', None)
mealplan = request.data.get('mealplan', None)
SLR = RecipeShoppingEditor(request.user, request.space, id=list_recipe, recipe=obj, mealplan=mealplan)
SLR = RecipeShoppingEditor(request.user, request.space, id=list_recipe, recipe=obj, mealplan=mealplan, servings=servings)
content = {'msg': _(f'{obj.name} was added to the shopping list.')}
http_status = status.HTTP_204_NO_CONTENT