Opened 12 years ago
Closed 12 years ago
#20141 closed Uncategorized (duplicate)
QuerySet filter should check type
Reported by: | Tomasz Kontusz | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When I'm filtering on ForeignKey, I can use an instance of any model in my filter.
Shouldn't .filter check if what I'm filtering with is an instance of the target model of FK?
Note:
See TracTickets
for help on using tickets.
Duplicate of #19669 and #16955.