Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25267 closed Bug (fixed)

Misleading error message for field in list_editable and not in list_display

Reported by: michalwerner Owned by: nobody
Component: contrib.admin Version: 1.8
Severity: Normal Keywords: admin, error message
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

Assume we have model with example filed something.
Now, creating admin page, if we place something in list_editable, but NOT in list_display we have error like this:

SystemCheckError: System check identified some issues:

ERRORS:
<class 'someapp.admin.SomeModel'>: (admin.E122) The value of 'list_editable[0]' refers to 'something', which is not an attribute of 'someapp.SomeModel'.

Error message suggests that field something does not exist in model, but in fact it DOES exist in model and DOES NOT exist in admin's list_display, so the explanation is not true and leads to confusion.

Change History (6)

comment:1 by Tim Graham, 9 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham, 9 years ago

Has patch: set
Patch needs improvement: set

Don't forget to check "Has patch" so the ticket appears in the review queue. Please uncheck "Patch needs improvement" when you update the pull request. Thanks!

comment:4 by Tim Graham, 9 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:5 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In ece7868:

Fixed #25267 -- Corrected message for admin.E122 system check.

comment:6 by Tim Graham <timograham@…>, 9 years ago

In c6523833:

[1.8.x] Fixed #25267 -- Corrected message for admin.E122 system check.

Backport of ece78684d9e09c477c4a0f10236c0aec45bac726 from master

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