112_Restructure_CompensationAction #115
@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user