Changes between Version 1 and Version 2 of Ticket #37470


Ignore:
Timestamp:
Nov 3, 2026, 1:46:28 AM (97 minutes ago)
Author:
maiload
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37470 – Description

    v1 v2  
    3838}}}
    3939
    40 {{{#!python
    41 always_false = ~ExpressionWrapper(~Q(pk__in=[]), output_field=BooleanField())
    42 Item.objects.filter(always_false)            # Expected: no rows. Actual: all rows.
    43 Item.objects.annotate(x=always_false)        # Expected: x=False. Actual: x=True.
    44 }}}
    45 
    4640The `CheckConstraint` case is a regression in 3434dbd39d373df7193ad006b970c09c1a909ea3 (#34754, backported to 4.2.5), which made `IsNull(Value(None), True)` raise `FullResultSet`. On its parent commit (2b582387d5) `validate_constraints()` correctly raises `ValidationError`. The queryset cases have been incorrect since `FullResultSet` was introduced in 76e37513e22f4d9a01c7f15eee36fe44388e6670 (refs #33374), shortly after `NegatedExpression` was added for #16211.
    4741
Back to Top