mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #27544 -- Fixed QuerySet.update(dt=F('dt') + timedelta) crash on SQLite.
This commit is contained in:
committed by
Tim Graham
parent
fb3716b156
commit
ade52ef71f
@@ -217,7 +217,7 @@ class DatabaseOperations(BaseDatabaseOperations):
|
||||
if value is not None:
|
||||
if not isinstance(value, datetime.datetime):
|
||||
value = parse_datetime(value)
|
||||
if settings.USE_TZ:
|
||||
if settings.USE_TZ and not timezone.is_aware(value):
|
||||
value = timezone.make_aware(value, self.connection.timezone)
|
||||
return value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user