Opened 4 months ago

Closed 4 months ago

#36363 closed Cleanup/optimization (fixed)

List duplicated fields in '(admin.E012) There are duplicate field(s)' error message.

Reported by: Eric Blum Owned by: Eric Blum
Component: contrib.admin Version: 5.2
Severity: Normal Keywords: duplicate fields, admin
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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)

comment:1 by Eric Blum, 4 months ago

Owner: set to Eric Blum
Status: newassigned

comment:2 by Eric Blum, 4 months ago

Has patch: set

comment:3 by Eric Blum, 4 months ago

Keywords: fields admin added
Version: 5.15.2

comment:5 by Sarah Boyce, 4 months ago

Triage Stage: UnreviewedAccepted
Type: New featureCleanup/optimization

comment:6 by Giannis Terzopoulos, 4 months ago

Patch needs improvement: set

comment:7 by Eric Blum, 4 months ago

Patch needs improvement: unset

comment:8 by Giannis Terzopoulos, 4 months ago

Triage Stage: AcceptedReady for checkin

comment:9 by Sarah Boyce <42296566+sarahboyce@…>, 4 months ago

Resolution: fixed
Status: assignedclosed

In 384cdf0f:

Fixed #36363 -- Added field names to admin duplicated fields error hint.

Note: See TracTickets for help on using tickets.
Back to Top