#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 lukeplant):
There is an argument for not fixing this: any time you add issubclass or
isinstance checks you are breaking duck-typing.
I have seen Django code where there were 'business' objects that wrapped
model objects, and sometimes, IIRC, were used interchangeably. Fixing this
bug might potentially break such code.
I'm also not entirely convinced that the removed/changed tests ought to be
invalid use cases. This is certainly a backwards incompatible change.
--
Ticket URL: <https://code.djangoproject.com/ticket/16955#comment:12>
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.