mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-05 06:08:46 -05:00
note optional
This commit is contained in:
@@ -86,7 +86,8 @@ def internal_recipe_update(request, pk):
|
|||||||
recipe_ingredient = RecipeIngredient()
|
recipe_ingredient = RecipeIngredient()
|
||||||
recipe_ingredient.recipe = recipe_instance
|
recipe_ingredient.recipe = recipe_instance
|
||||||
|
|
||||||
recipe_ingredient.note = i['note']
|
if 'note' in i:
|
||||||
|
recipe_ingredient.note = i['note']
|
||||||
|
|
||||||
if Ingredient.objects.filter(name=i['ingredient__name']).exists():
|
if Ingredient.objects.filter(name=i['ingredient__name']).exists():
|
||||||
recipe_ingredient.ingredient = Ingredient.objects.get(name=i['ingredient__name'])
|
recipe_ingredient.ingredient = Ingredient.objects.get(name=i['ingredient__name'])
|
||||||
|
|||||||
Reference in New Issue
Block a user