diff options
author | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2018-02-09 11:08:55 -0800 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2018-02-09 12:22:51 -0800 |
commit | 66d862611a51b3c12813b4752819230e15f2a472 (patch) | |
tree | 6bd5cad6def127221d4310aa10be13839f37fcc1 /dashboard/src | |
parent | 87a087873998fbf637daf66518916feab98d84d3 (diff) |
Ensure DEBUG is set as a Boolean
Since os.environ only allows strings DEBUG needs to be converted.
Assigning DEBUG to the comparison of the strings is enough to get the
correct value out.
Change-Id: Ie104d2fc5de5906ad2830c5ed7cff3b1c0fda3c5
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'dashboard/src')
-rw-r--r-- | dashboard/src/pharos_dashboard/settings.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dashboard/src/pharos_dashboard/settings.py b/dashboard/src/pharos_dashboard/settings.py index fa5879f..361c4a1 100644 --- a/dashboard/src/pharos_dashboard/settings.py +++ b/dashboard/src/pharos_dashboard/settings.py @@ -5,7 +5,9 @@ from datetime import timedelta BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = os.environ['DEBUG'] +# NOTE: os.environ only returns strings, so making a comparison to +# 'True' here will convert it to the correct Boolean value. +DEBUG = os.environ['DEBUG'] == 'True' # Application definition |