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

fix root_page getting

parent 6532cdfa
No related branches found
No related tags found
2 merge requests!1035Release,!1034Minor fixes
Pipeline #18768 passed
......@@ -92,7 +92,7 @@ class ExtendedMetadataHomePageMixin(models.Model):
title = super().get_meta_title()
suffix = self.get_meta_title_suffix()
if title == self.root_page.title:
if hasattr(self, "root_page") and title == self.root_page.title:
return f"Domů | Piráti {suffix}"
# Covers scenario when title_suffix is not set and evaluates to super().get_meta_title() value.
......@@ -137,7 +137,7 @@ class ExtendedMetadataPageMixin(models.Model):
title = super().get_meta_title()
suffix = self.get_meta_title_suffix()
if title == self.root_page.title:
if hasattr(self, "root_page") and title == self.root_page.title:
return f"Domů | Piráti {suffix}"
# Covers scenario when title_suffix is not set and evaluates to super().get_meta_title() value.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment