Opened 3 years ago

Closed 3 years ago

#20141 closed Uncategorized (duplicate)

QuerySet filter should check type

Reported by: ktosiek 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


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?

Change History (1)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #19669 and #16955.

Note: See TracTickets for help on using tickets.
Back to Top