django__django-11905
Prevent using __isnull lookup with non-boolean value.
Verdict: the issue points to the file or function that was changed (Tier B).
André, IMO we should deprecate using non-boolean values in Django 3.1 (RemovedInDjango40Warning) and remove in Django 4.0 (even if it is untested and undocumented). I can imagine that a lot of people use e.g. 1 and 0 instead of booleans. Attached diff fixes also issue with passing a F() expression. def as_sql(self, compiler, connection): if not isinstance(self.rhs, bool): raise RemovedInDjango40Warning(...) ....
The two checks disagreed (stated fix vs. points to it); the lower reading shown: “André, IMO we should deprecate using non-boolean values in Django 3.1 (RemovedInDjango40Warning) and remove in Django 4.0 (even if it is untested and…”
All SWE-bench Lite tasks · more django/django tasks · How the check works