#15819: Admin searches should use distinct, if query involves joins
-------------------------------------+-------------------------------------
Reporter: Adam | Owner: ryankask
Kochanowski <aip@…> | Status: new
Type: Bug | Component: contrib.admin
Milestone: | Severity: Normal
Version: 1.3 | Keywords:
Resolution: | Has patch: 1
Triage Stage: Accepted | Needs tests: 0
Needs documentation: 0 | Easy pickings: 0
Patch needs improvement: 0 |
-------------------------------------+-------------------------------------
Changes (by carljm):
* stage: Unreviewed => Accepted
Comment:
Hi Ryan - this looks pretty good to me. The second patch doesn't appear to
be complete, it only includes the changed test file, not the code changes.
Can you upload a complete updated patch? (The boilerplate-removal in the
second patch looks fine to me, it's related since its adding flexibility
to test-support code that your added tests use).
Re style, is there a reason for the field_needs_distinct function to be a
closure defined inside get_query_set, rather than a module-level function?
I would just do the latter for simplicity if we don't need the closure.
Re the select_related() call, that's not, erm, related to this bug. It
actually may be that we could call select_related in a couple more cases
(specifically, one-to-ones and reverse one-to-ones), but we'd need a
separate ticket for that optimization.
--
Ticket URL: <http://code.djangoproject.com/ticket/15819#comment:10>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.