Recipes phase 4
This commit is contained in:
@@ -372,6 +372,11 @@ def edit_entry(request, pk):
|
||||
sync_food_hydration(updated)
|
||||
updated.full_clean()
|
||||
updated.save()
|
||||
if updated.created_via == 'recipe':
|
||||
run = getattr(updated, 'recipe_cooking_run', None)
|
||||
if run:
|
||||
run.consumed_servings = updated.amount
|
||||
run.save(update_fields=('consumed_servings',))
|
||||
if product:
|
||||
_save_custom_portion(form, request.user, product, updated)
|
||||
return _diary_response(request, entry.date)
|
||||
|
||||
Reference in New Issue
Block a user