diff options
| author | Andrew Nester <andrew.nester.dev@gmail.com> | 2016-11-29 20:23:44 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-29 12:23:44 -0500 |
| commit | ade52ef71f04e57e217585358cb289098260e3ec (patch) | |
| tree | 2271911c2009dc7cb66f0339b11ad0877d2e1ea4 /django | |
| parent | fb3716b15679bc27926aebfd7c6ca9a8b3e986c3 (diff) | |
Fixed #27544 -- Fixed QuerySet.update(dt=F('dt') + timedelta) crash on SQLite.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/backends/sqlite3/operations.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/sqlite3/operations.py b/django/db/backends/sqlite3/operations.py index ad6b2a5a2a..1ab20767c4 100644 --- a/django/db/backends/sqlite3/operations.py +++ b/django/db/backends/sqlite3/operations.py @@ -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 |
