#16955: Querying on the reverse of a FK with the wrong class silently returns
bad
data
-------------------------------------+-------------------------------------
Reporter: jdunck | Owner: dgouldin
Type: Bug | Status: new
Component: Database layer | Version: 1.3
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by akaariai):
I am sure it is possible to do the validity checks in a way that doesn't
break duck typing, and preserves the OneToOneField behaviour. The
_pk_trace code could do validity checks only if the value is subclass of
model. But doing the OneToOneField preservation will likely be ugly.
If a nice patch surfaces I do think it is a good idea to add the check. It
is not a good idea to do a backwards compatibility break just for the
check.
--
Ticket URL: <https://code.djangoproject.com/ticket/16955#comment:13>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.