From ebd397f351eacc28066bdfd1e7be152bcd9dc87d Mon Sep 17 00:00:00 2001 From: Benjamin Date: Mon, 6 Mar 2023 17:49:57 +0100 Subject: [PATCH] minor --- recipes/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/views.py b/recipes/views.py index 898f670..a64ff82 100644 --- a/recipes/views.py +++ b/recipes/views.py @@ -123,7 +123,7 @@ def edit_version(request, slug_recipe, slug_version): recipe = get_object_or_404(Recipe, slug=slug_recipe) version = get_object_or_404(Version, recipe=recipe, slug=slug_version) - if request.method == 'POST': # TODO refactor with add_version + if request.method == 'POST': version_form = VersionForm(request.POST, prefix=VERSION_FORM_PREFIX, instance=version, author_placeholder=get_name_of_user(request.user)) ingredients_formset = IngredientFormSet(request.POST, queryset=version.ingredients.all(), prefix=INGREDIENTS_FORMSET_PREFIX) # type: ignore version_form.recipe_id = recipe.id # type: ignore