mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #25367 -- Allowed boolean expressions in QuerySet.filter() and exclude().
This allows using expressions that have an output_field that is a BooleanField to be used directly in a queryset filters, or in the When() clauses of a Case() expression. Thanks Josh Smeaton, Tim Graham, Simon Charette, Mariusz Felisiak, and Adam Johnson for reviews. Co-Authored-By: NyanKiyoshi <hello@vanille.bid>
This commit is contained in:
parent
069bee7c12
commit
4137fc2efc
10 changed files with 184 additions and 23 deletions
|
@ -34,6 +34,7 @@ class Company(models.Model):
|
|||
related_name='company_point_of_contact_set',
|
||||
null=True,
|
||||
)
|
||||
based_in_eu = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue