[Django] #22396: Admin AllValuesFieldListFilter not respecting ModelAdmin.get_queryset

16 views
Skip to first unread message

Django

unread,
Apr 7, 2014, 3:50:56 AM4/7/14
to django-...@googlegroups.com
#22396: Admin AllValuesFieldListFilter not respecting ModelAdmin.get_queryset
-------------------------------+--------------------
Reporter: serialx.net@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
Admin's AllValuesFieldListFilter object does not respect
ModelAdmin.get_queryset. Instead it mysteriously calls
reverse_field_path() method and uses the _default_manager to get the
queryset.

It causes problems when the default database has no table for the model,
and only the other databases has the table. It causes "Table not found"
query error message.

Pull request: https://github.com/django/django/pull/2522

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

Django

unread,
Apr 7, 2014, 8:58:43 AM4/7/14
to django-...@googlegroups.com
#22396: Admin AllValuesFieldListFilter not respecting ModelAdmin.get_queryset
-------------------------------+--------------------------------------

Reporter: serialx.net@… | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timo):

* needs_better_patch: => 0
* needs_tests: => 0
* easy: 1 => 0
* needs_docs: => 0


Comment:

Could you add a test to demonstrate the problem?

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

Django

unread,
Apr 29, 2014, 7:02:16 PM4/29/14
to django-...@googlegroups.com
#22396: Admin AllValuesFieldListFilter not respecting ModelAdmin.get_queryset
-------------------------------+--------------------------------------
Reporter: serialx.net@… | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timo):

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


Comment:

The proposed patch breaks some `admin_view` tests. Please reopen if you
can provide more details and a patch that doesn't break tests. Thanks!

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

Reply all
Reply to author
Forward
0 new messages