From 0fcee1676c7f14bb08e2cc662898dee56d9cf207 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Sat, 13 Jan 2024 16:16:58 -0500 Subject: Fixed #35111 -- Fixed compilation of DateField __in/__range rhs on SQLite and MySQL. Also removed tests that ensured that adapt_(date)timefield backend operations where able to deal with expressions when it's not the case for any other adapt methods. --- django/db/backends/sqlite3/operations.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'django/db/backends/sqlite3') diff --git a/django/db/backends/sqlite3/operations.py b/django/db/backends/sqlite3/operations.py index dfc9857b84..29a5c0391e 100644 --- a/django/db/backends/sqlite3/operations.py +++ b/django/db/backends/sqlite3/operations.py @@ -263,10 +263,6 @@ class DatabaseOperations(BaseDatabaseOperations): if value is None: return None - # Expression values are adapted by the database. - if hasattr(value, "resolve_expression"): - return value - # SQLite doesn't support tz-aware datetimes if timezone.is_aware(value): if settings.USE_TZ: @@ -283,10 +279,6 @@ class DatabaseOperations(BaseDatabaseOperations): if value is None: return None - # Expression values are adapted by the database. - if hasattr(value, "resolve_expression"): - return value - # SQLite doesn't support tz-aware datetimes if timezone.is_aware(value): raise ValueError("SQLite backend does not support timezone-aware times.") -- cgit v1.3