[Django] #25267: Misleading error message for field in list_editable and not in list_display

8 views
Skip to first unread message

Django

unread,
Aug 12, 2015, 4:23:14 PM8/12/15
to django-...@googlegroups.com
#25267: Misleading error message for field in list_editable and not in list_display
-------------------------------+----------------------------------
Reporter: michalwerner | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Keywords: admin, error message
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+----------------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25267>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 12, 2015, 5:45:15 PM8/12/15
to django-...@googlegroups.com
#25267: Misleading error message for field in list_editable and not in list_display
--------------------------------------+------------------------------------

Reporter: michalwerner | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: admin, error message | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* easy: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25267#comment:1>

Django

unread,
Aug 13, 2015, 4:04:34 AM8/13/15
to django-...@googlegroups.com
#25267: Misleading error message for field in list_editable and not in list_display
--------------------------------------+------------------------------------

Reporter: michalwerner | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: admin, error message | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by zauddelig):

patch proposal:
https://github.com/django/django/pull/5135

--
Ticket URL: <https://code.djangoproject.com/ticket/25267#comment:2>

Django

unread,
Aug 13, 2015, 6:38:08 AM8/13/15
to django-...@googlegroups.com
#25267: Misleading error message for field in list_editable and not in list_display
--------------------------------------+------------------------------------

Reporter: michalwerner | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: admin, error message | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1
* has_patch: 0 => 1


Comment:

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!

--
Ticket URL: <https://code.djangoproject.com/ticket/25267#comment:3>

Django

unread,
Aug 13, 2015, 12:37:44 PM8/13/15
to django-...@googlegroups.com
#25267: Misleading error message for field in list_editable and not in list_display
-------------------------------------+-------------------------------------

Reporter: michalwerner | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: admin, error | Triage Stage: Ready for
message | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/25267#comment:4>

Django

unread,
Aug 13, 2015, 12:58:25 PM8/13/15
to django-...@googlegroups.com
#25267: Misleading error message for field in list_editable and not in list_display
-------------------------------------+-------------------------------------
Reporter: michalwerner | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: admin, error | Triage Stage: Ready for
message | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"ece78684d9e09c477c4a0f10236c0aec45bac726" ece7868]:
{{{
#!CommitTicketReference repository=""
revision="ece78684d9e09c477c4a0f10236c0aec45bac726"
Fixed #25267 -- Corrected message for admin.E122 system check.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25267#comment:5>

Django

unread,
Aug 13, 2015, 1:21:16 PM8/13/15
to django-...@googlegroups.com
#25267: Misleading error message for field in list_editable and not in list_display
-------------------------------------+-------------------------------------
Reporter: michalwerner | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.8

Severity: Normal | Resolution: fixed
Keywords: admin, error | Triage Stage: Ready for
message | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"c6523833790468e88b1967df23f2cdd65114c314" c6523833]:
{{{
#!CommitTicketReference repository=""
revision="c6523833790468e88b1967df23f2cdd65114c314"
[1.8.x] Fixed #25267 -- Corrected message for admin.E122 system check.

Backport of ece78684d9e09c477c4a0f10236c0aec45bac726 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25267#comment:6>

Reply all
Reply to author
Forward
0 new messages