mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Fix possible crash in migration
This commit is contained in:
@@ -10,6 +10,7 @@ def migrate_confirm_text(apps, schema_editor):
|
|||||||
# from `confirm_text` to `confirm_texts`
|
# from `confirm_text` to `confirm_texts`
|
||||||
Event_SettingsStore = apps.get_model('pretixbase', 'Event_SettingsStore')
|
Event_SettingsStore = apps.get_model('pretixbase', 'Event_SettingsStore')
|
||||||
for store in Event_SettingsStore.objects.filter(key="confirm_text"):
|
for store in Event_SettingsStore.objects.filter(key="confirm_text"):
|
||||||
|
if store.value:
|
||||||
values = json.dumps([json.loads(store.value)]) # convert single value to one-element list
|
values = json.dumps([json.loads(store.value)]) # convert single value to one-element list
|
||||||
store.key = "confirm_texts"
|
store.key = "confirm_texts"
|
||||||
store.value = values
|
store.value = values
|
||||||
|
|||||||
Reference in New Issue
Block a user