List duplicated fields in '(admin.E012) There are duplicate field(s)' error message.
When admin fields are duplicated the system check gives an error like:
<class 'project.admin.MyModelAdmin'>: (admin.E012) There are duplicate field(s) in 'fieldsets[1][1]'.
This is typically enough to find the duplicate fields but then requires scanning through all the fields which can be difficult on admin classes with many fields. Including the names of the duplicated fields in the error message would make the process quicker to debug as well as friendlier.
e.g.
<class 'project.admin.MyModelAdmin'>: (admin.E012) There are duplicate field(s) in 'fieldsets[1][1]': ['field_1', 'field2'].
Change History
(9)
Owner: |
set to Eric Blum
|
Status: |
new → assigned
|
Keywords: |
fields admin added
|
Version: |
5.1 → 5.2
|
Triage Stage: |
Unreviewed → Accepted
|
Type: |
New feature → Cleanup/optimization
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
PR Created: https://github.com/django/django/pull/19440