add to shopping from card context menu

This commit is contained in:
smilerz
2021-10-31 15:18:00 -05:00
parent a217db5822
commit f245aa8b4f
16 changed files with 279 additions and 250 deletions

View File

@ -657,7 +657,6 @@ class RecipeViewSet(viewsets.ModelViewSet):
servings = request.data.get('servings', obj.servings)
list_recipe = request.data.get('list_recipe', None)
content = {'msg': _(f'{obj.name} was added to the shopping list.')}
# TODO: Consider if this should be a Recipe method
list_from_recipe(list_recipe=list_recipe, recipe=obj, ingredients=ingredients, servings=servings, space=request.space, created_by=request.user)
return Response(content, status=status.HTTP_204_NO_CONTENT)