#112 Migration enhance
* fixes bug in migration * adds check to migration which raises error before data loss might happen
This commit is contained in:
parent
2b66189590
commit
afb78fa670
@ -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):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user