From 66ce814b43e6428eb893a16851d1d5892135866c Mon Sep 17 00:00:00 2001 From: frcroth Date: Thu, 24 Oct 2024 16:50:01 +0200 Subject: [PATCH] Lint --- .../0013_merge_first_and_second_level_menu_items.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/myhpi/core/migrations/0013_merge_first_and_second_level_menu_items.py b/myhpi/core/migrations/0013_merge_first_and_second_level_menu_items.py index c5df2fba..8f4a6649 100644 --- a/myhpi/core/migrations/0013_merge_first_and_second_level_menu_items.py +++ b/myhpi/core/migrations/0013_merge_first_and_second_level_menu_items.py @@ -12,7 +12,9 @@ def replace_menu_items(apps, schema_editor): Revisions = apps.get_model("wagtailcore", "Revision") first_level_menu_item_content_type_id = ContentType.objects.get_for_model(FirstLevelMenuItem).id - second_level_menu_item_content_type_id = ContentType.objects.get_for_model(SecondLevelMenuItem).id + second_level_menu_item_content_type_id = ContentType.objects.get_for_model( + SecondLevelMenuItem + ).id for menu_item in FirstLevelMenuItem.objects.all(): basepage_ptr_id = menu_item.basepage_ptr_id @@ -35,11 +37,14 @@ def replace_menu_items(apps, schema_editor): revision.content_type_id = menu_item_content_type revision.base_content_type_id = menu_item_content_type revision.save() - for revision in Revisions.objects.filter(content_type_id=second_level_menu_item_content_type_id): + for revision in Revisions.objects.filter( + content_type_id=second_level_menu_item_content_type_id + ): revision.content_type_id = menu_item_content_type revision.base_content_type_id = menu_item_content_type revision.save() + class Migration(migrations.Migration): dependencies = [