summaryrefslogtreecommitdiff
path: root/django/db/models/fields
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2022-11-06 11:19:33 -0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-11-07 20:23:53 +0100
commit76e37513e22f4d9a01c7f15eee36fe44388e6670 (patch)
tree575decec7547c3c128857b0444f342452865a0f9 /django/db/models/fields
parent4b702c832cd550fe682ef37a69e93866815b9123 (diff)
downloaddjango-76e37513e22f4d9a01c7f15eee36fe44388e6670.tar.gz
Refs #33374 -- Adjusted full match condition handling.
Adjusting WhereNode.as_sql() to raise an exception when encoutering a full match just like with empty matches ensures that all case are explicitly handled.
Diffstat (limited to 'django/db/models/fields')
-rw-r--r--django/db/models/fields/__init__.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index 5069a491e8..2a98396cad 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -1103,15 +1103,6 @@ class BooleanField(Field):
defaults = {"form_class": form_class, "required": False}
return super().formfield(**{**defaults, **kwargs})
- def select_format(self, compiler, sql, params):
- sql, params = super().select_format(compiler, sql, params)
- # Filters that match everything are handled as empty strings in the
- # WHERE clause, but in SELECT or GROUP BY list they must use a
- # predicate that's always True.
- if sql == "":
- sql = "1"
- return sql, params
-
class CharField(Field):
description = _("String (up to %(max_length)s)")