mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
Fix up an export issue for tower_settings
This commit is contained in:
parent
7867a58c00
commit
16aa34522c
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user