Fixed #33527 -- Removed unnecessary code in ModelAdmin._changeform_view().

Co-authored-by: Daulet1 <d.abduali@thefactory.kz>
This commit is contained in:
Dulalet 2022-02-26 23:07:56 +06:00 committed by GitHub
parent c1d168be0f
commit e0442a628e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1787,7 +1787,7 @@ class ModelAdmin(BaseModelAdmin):
form = ModelForm(request.POST, request.FILES, instance=obj)
formsets, inline_instances = self._create_formsets(
request,
form.instance if add else obj,
form.instance,
change=not add,
)
form_validated = form.is_valid()