Changes between Initial Version and Version 1 of Ticket #26983, comment 3


Ignore:
Timestamp:
Aug 2, 2016, 3:38:01 AM (8 years ago)
Author:
Baptiste Mispelon

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26983, comment 3

    initial v1  
    22
    33The 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
     7Following 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.
Back to Top