#24002: .filter(generic_rel=val) should filter on related model primary key 
value,
not the object_id value
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |               Resolution:  fixed
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by Anssi Kääriäinen <akaariai@…>):

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


Comment:

 In [changeset:"1c5cbf5e5d5b350f4df4aca6431d46c767d3785a"]:
 {{{
 #!CommitTicketReference repository=""
 revision="1c5cbf5e5d5b350f4df4aca6431d46c767d3785a"
 Fixed #24002 -- GenericRelation filtering targets related model's pk

 Previously Publisher.objects.filter(book=val) would target
 book.object_id if book is a GenericRelation. This is inconsistent to
 filtering over reverse foreign key relations, where the target is the
 related model's primary key.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24002#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/066.65c8ba341717fe8076ec53d9034f5d4e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to