Fixed migrations by skipping autoupdate.
This commit is contained in:
parent
f8be521bf5
commit
9ca15fd0b8
@ -19,7 +19,7 @@ def convert_duration(apps, schema_editor):
|
||||
if len(split) == 2 and is_int(split[0]) and is_int(split[1]):
|
||||
# duration = hours * 60 + minutes
|
||||
item.duration_tmp = int(split[0]) * 60 + int(split[1])
|
||||
item.save()
|
||||
item.save(skip_autoupdate=True)
|
||||
|
||||
|
||||
def is_int(s):
|
||||
|
@ -24,7 +24,7 @@ def move_custom_slides_to_topics(apps, schema_editor):
|
||||
item = Item.objects.get(object_id=custom_slide.pk, content_type=content_type_custom_slide)
|
||||
item.object_id = topic.pk
|
||||
item.content_type = content_type_topic
|
||||
item.save()
|
||||
item.save(skip_autoupdate=True)
|
||||
|
||||
# Delete old data.
|
||||
CustomSlide.objects.all().delete()
|
||||
|
@ -22,7 +22,7 @@ def change_label_of_state(apps, schema_editor):
|
||||
else:
|
||||
state.name = 'refered to committee'
|
||||
state.action_word = 'Refer to committee'
|
||||
state.save()
|
||||
state.save(skip_autoupdate=True)
|
||||
|
||||
|
||||
def add_recommendation_labels(apps, schema_editor):
|
||||
@ -46,7 +46,7 @@ def add_recommendation_labels(apps, schema_editor):
|
||||
for state in State.objects.all():
|
||||
if name_label_map.get(state.name):
|
||||
state.recommendation_label = name_label_map[state.name]
|
||||
state.save()
|
||||
state.save(skip_autoupdate=True)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
Loading…
Reference in New Issue
Block a user