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
|
|
498 | 498 | # Auto fields are editable, so check for auto or non-editable pk. |
499 | 499 | self.form._meta.model._meta.auto_field |
500 | 500 | 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 ()) |
501 | 503 | or |
502 | 504 | # Also search any parents for an auto field. (The pk info is |
503 | 505 | # propagated to child models so that does not need to be checked |