Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#7555 closed (worksforme)

Django admin bug: Can't edit content not in Queryset

Reported by: artagnon Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords: manager queryset get_query_set
Cc: Triage Stage: Fixed on a branch
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When the default manager's get_query_set() is overridden to narrow down the queryset, django's admin interface displays all the articles for the model regardless but clicking on one of the articles not in the queryset in an attempt to modify it throws up an error similar to:
writeup object with primary key u'3' does not exist
In my opinion, if Django wants to use the default manager, the articles not in the queryset shouldn't appear in the list. Ofcourse, this problem is easily fixed by overriding the get_query_set() only in an alternate manager and not in the default manager.

Change History (2)

comment:1 by Karen Tracey <kmtracey@…>, 16 years ago

Resolution: worksforme
Status: newclosed
Triage Stage: UnreviewedFixed on a branch

Using newforms-admin, I don't get items excluded by the default manager listed on the admin page for the model (whereas I do when using the exact same model code in trunk admin). So I believe this is something already fixed in newforms-admin.

comment:2 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

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