summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-02-06 09:21:05 -0500
committerTim Graham <timograham@gmail.com>2016-02-08 07:21:54 -0500
commit97eb3356b2a7488c8d0ca0e47ef3e538852d44a2 (patch)
tree7e5a9a9ead57d7ff351c8a71c54454be6a324c00 /django/db
parente000ca23d206e1c615d1d87af24d940239d6c3ca (diff)
Fixed #26177 -- Fixed a PostgreSQL crash with TIME_ZONE=None and USE_TZ=False.
Diffstat (limited to 'django/db')
-rw-r--r--django/db/backends/postgresql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index 7822c66327..2f3b00bfb6 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -197,7 +197,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
conn_timezone_name = self.connection.get_parameter_status('TimeZone')
- if conn_timezone_name != self.timezone_name:
+ if self.timezone_name and conn_timezone_name != self.timezone_name:
cursor = self.connection.cursor()
try:
cursor.execute(self.ops.set_time_zone_sql(), [self.timezone_name])