diff --git a/compensation/migrations/0004_auto_20220210_1402.py b/compensation/migrations/0004_auto_20220210_1402.py index 44d43cbe..7cc8126c 100644 --- a/compensation/migrations/0004_auto_20220210_1402.py +++ b/compensation/migrations/0004_auto_20220210_1402.py @@ -9,9 +9,12 @@ def migrate_actions(apps, schema_editor): for action in actions: action_type = action.action_type or [] - action.action_type_tmp.set(action_type) + action.action_type_tmp.set([action_type]) action.save() + if not action.action_type_tmp.count() > 0: + raise ValueError("Migration of actions did not work! Stoped before data loss!") + class Migration(migrations.Migration):