From 16aa34522c36b71aeecb8021c6758f6b1b94ce76 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Tue, 15 Dec 2015 15:13:58 -0500 Subject: [PATCH] Fix up an export issue for tower_settings --- awx/main/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/awx/main/conf.py b/awx/main/conf.py index 147afabe46..8e49d9a10f 100644 --- a/awx/main/conf.py +++ b/awx/main/conf.py @@ -8,8 +8,8 @@ from awx.main.models.configuration import TowerSettings class TowerConfiguration(object): def __getattr__(self, key): - ts = TowerSettings.objects.filter(key=name) - if not ts.exists: + ts = TowerSettings.objects.filter(key=key) + if not ts.exists(): return getattr(django_settings, key) return ts[0].value_converted @@ -28,3 +28,5 @@ class TowerConfiguration(object): else: settings_actual['value'] = value settings_actual.save() + +tower_settings = TowerConfiguration()