#23518: Subquery does not respect explicit __exact
-------------------------------------+-------------------------------------
     Reporter:  john-parton          |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  1.7
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:  subquery subselect   |  Unreviewed
  exact                              |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by timgraham):

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


Comment:

 If you expect the query to return one result, why not use `.get()` instead
 of `.filter()`. Also couldn't you restructure your example more simply as
 `Parent.objects.filter(parent__slug='test')`. I guess some documentation
 could at least be updated.

--
Ticket URL: <https://code.djangoproject.com/ticket/23518#comment:1>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.6b200d02f2aae9860843f0850d9e8cca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to