Skip to content

Commit

Permalink
fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
theskumar committed Sep 26, 2024
1 parent aff4215 commit b3fd203
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hypha/core/migrations/0007_copy_homepage_title_strapline.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ def copy_homepage_title_and_strapline(apps, schema_editor):
from hypha.core.models import SystemSettings
from hypha.home.models import ApplyHomePage

system_settings = SystemSettings.load()
system_settings.home_title = ApplyHomePage.objects.first().title
system_settings.home_strapline = ApplyHomePage.objects.first().strapline
system_settings.save()
home_page = ApplyHomePage.objects.first()
if hasattr(home_page, "strapline"):
system_settings = SystemSettings.load()
system_settings.home_title = ApplyHomePage.objects.first().title
system_settings.home_strapline = ApplyHomePage.objects.first().strapline
system_settings.save()

dependencies = [
("core", "0006_systemsettings_home_strapline_and_more"),
Expand Down

0 comments on commit b3fd203

Please sign in to comment.