Changes between Initial Version and Version 1 of Ticket #33527


Ignore:
Timestamp:
Feb 18, 2022, 7:53:14 PM (3 years ago)
Author:
Tim Graham
Comment:

I don't see any test failures with the following patch, so if it's needed, perhaps a regression test would be useful.

  • django/contrib/admin/options.py

    diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
    index b1aa610d43..64be087bf1 100644
    a b class ModelAdmin(BaseModelAdmin):  
    17871787            form = ModelForm(request.POST, request.FILES, instance=obj)
    17881788            formsets, inline_instances = self._create_formsets(
    17891789                request,
    1790                 form.instance if add else obj,
     1790                form.instance,
    17911791                change=not add,
    17921792            )
    17931793            form_validated = form.is_valid()

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33527

    • Property Cc Mariusz Felisiak removed
  • Ticket #33527 – Description

    initial v1  
    1 i see in Patch from https://code.djangoproject.com/ticket/33111
    2 was added:
     1In #33111, the following code was added:
    32
    43{{{
     
    1514form.instance if add else obj
    1615}}}
    17 i think, it should be:
     16I think, it should be:
    1817{{{
    1918form = ModelForm(request.POST, request.FILES, instance=obj)
Back to Top