From 791af96d7f2e75c4367667a36649d3462178c323 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Mon, 17 Sep 2018 15:58:00 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20verifica=20se=20TIME=5FZONE=20=C3=A9?= =?UTF-8?q?=20string=20vazia=20e=20finaliza=20caso=20seja.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sapl/settings.py b/sapl/settings.py index ec46dd092..12865c501 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -231,7 +231,10 @@ LANGUAGES = ( ('pt-br', 'Português'), ) -TIME_ZONE = config('TZ', cast=str, default='America/Sao_Paulo') +TIME_ZONE = config('TZ', default='America/Sao_Paulo') +if not TIME_ZONE: + raise ValueError('TIMEZONE env variable undefined in .env settings file! Leaving...') + USE_I18N = True USE_L10N = True USE_TZ = True