minor
This commit is contained in:
parent
a78be3378b
commit
ebd397f351
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue