From 9ca15fd0b894b574afd5f89b7838471dec2183c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Mon, 24 Oct 2016 10:42:34 +0200 Subject: [PATCH] Fixed migrations by skipping autoupdate. --- openslides/agenda/migrations/0002_duration.py | 2 +- openslides/core/migrations/0005_auto_20160918_2104.py | 2 +- openslides/motions/migrations/0004_auto_20160907_2343.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openslides/agenda/migrations/0002_duration.py b/openslides/agenda/migrations/0002_duration.py index 35c168c26..990f3d13b 100644 --- a/openslides/agenda/migrations/0002_duration.py +++ b/openslides/agenda/migrations/0002_duration.py @@ -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): diff --git a/openslides/core/migrations/0005_auto_20160918_2104.py b/openslides/core/migrations/0005_auto_20160918_2104.py index 377e106df..117751b90 100644 --- a/openslides/core/migrations/0005_auto_20160918_2104.py +++ b/openslides/core/migrations/0005_auto_20160918_2104.py @@ -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() diff --git a/openslides/motions/migrations/0004_auto_20160907_2343.py b/openslides/motions/migrations/0004_auto_20160907_2343.py index 88dde5d08..1b5739681 100644 --- a/openslides/motions/migrations/0004_auto_20160907_2343.py +++ b/openslides/motions/migrations/0004_auto_20160907_2343.py @@ -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):