#36363: List duplicated fields in '(admin.E012) There are duplicate field(s)' error
message.
----------------------------+-----------------------------------------
Reporter: Safrone | Type: New feature
Status: new | Component: contrib.admin
Version: 5.1 | Severity: Normal
Keywords: duplicate, | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
----------------------------+-----------------------------------------
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'].
}}}
--
Ticket URL: <
https://code.djangoproject.com/ticket/36363>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.