Changes between Initial Version and Version 1 of Ticket #26983, comment 3
- Timestamp:
- Aug 2, 2016, 3:38:01 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26983, comment 3
initial v1 2 2 3 3 The key to the failure seems to be the `to_field` attribute of the ForeignKey. Without it, the query seems to be generated correctly. 4 5 ** --Edit-- ** 6 7 Following the advice of kezabelle on IRC, I placed a PDB trace right before https://github.com/django/django/blob/master/django/db/models/lookups.py#L436 and found out that at this point, the value of `self.rhs` is `'False'`, that is the string `'False'` rather than a boolean object, which triggers the wrong branch of the `if` statement.