Ticket #35393: django-helpers-fix.patch

File django-helpers-fix.patch, 1015 bytes (added by Willem Van Onsem, 3 months ago)
  • django/contrib/admin/helpers.py

    Subject: [PATCH] django-helpers-fix
    ---
    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py
    a b  
    498498            # Auto fields are editable, so check for auto or non-editable pk.
    499499            self.form._meta.model._meta.auto_field
    500500            or not self.form._meta.model._meta.pk.editable
     501            # the primary key can be editable, but excluded from the inline as well
     502            or self.form._meta.model._meta.pk.name in (self.form._meta.exclude or ())
    501503            or
    502504            # Also search any parents for an auto field. (The pk info is
    503505            # propagated to child models so that does not need to be checked
Back to Top