Fix configure Tower in Tower to work with updated django-jsonfield.

This commit is contained in:
Chris Church
2016-11-15 00:22:55 -05:00
parent f5d3e1885e
commit 8dc5e7725c
7 changed files with 20 additions and 31 deletions

View File

@@ -14,11 +14,6 @@ def copy_tower_settings(apps, schema_editor):
# LICENSE is stored as a string; convert it to a dict.
if tower_setting.key == 'LICENSE':
value = json.loads(value)
# Anything else (e.g. TOWER_URL_BASE) that is stored as a string
# needs to be converted to a JSON-encoded string to work with the
# JSON field.
elif tower_setting.value_type == 'string':
value = json.dumps(value)
setting, created = Setting.objects.get_or_create(
key=tower_setting.key,
user=tower_setting.user,