From 97eb3356b2a7488c8d0ca0e47ef3e538852d44a2 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 6 Feb 2016 09:21:05 -0500 Subject: Fixed #26177 -- Fixed a PostgreSQL crash with TIME_ZONE=None and USE_TZ=False. --- django/test/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/test') diff --git a/django/test/signals.py b/django/test/signals.py index 1a86b1f846..e9ba517073 100644 --- a/django/test/signals.py +++ b/django/test/signals.py @@ -69,7 +69,7 @@ def update_connections_time_zone(**kwargs): except AttributeError: pass tz_sql = conn.ops.set_time_zone_sql() - if tz_sql: + if tz_sql and conn.timezone_name: with conn.cursor() as cursor: cursor.execute(tz_sql, [conn.timezone_name]) -- cgit v1.3