Skip to content
Snippets Groups Projects
Commit e2ab5208 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

fix migration

parent e907fa20
No related branches found
No related tags found
2 merge requests!1309Release,!1308fix migration
Pipeline #21007 passed
...@@ -11,6 +11,9 @@ def add_district_search_pages(apps, schema_editor): ...@@ -11,6 +11,9 @@ def add_district_search_pages(apps, schema_editor):
if DistrictSearchPage.objects.descendant_of(home_page).exists(): if DistrictSearchPage.objects.descendant_of(home_page).exists():
unlive_page = DistrictSearchPage.objects.descendant_of(home_page).first() unlive_page = DistrictSearchPage.objects.descendant_of(home_page).first()
if unlive_page is None:
continue
if not unlive_page.live: if not unlive_page.live:
unlive_page.publish() unlive_page.publish()
... ...
......
...@@ -11,6 +11,9 @@ def add_uniweb_search_pages(apps, schema_editor): ...@@ -11,6 +11,9 @@ def add_uniweb_search_pages(apps, schema_editor):
if UniwebSearchPage.objects.descendant_of(home_page).exists(): if UniwebSearchPage.objects.descendant_of(home_page).exists():
unlive_page = UniwebSearchPage.objects.descendant_of(home_page).first() unlive_page = UniwebSearchPage.objects.descendant_of(home_page).first()
if unlive_page is None:
continue
if not unlive_page.live: if not unlive_page.live:
unlive_page.publish() unlive_page.publish()
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment