Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix displaying menu item link

Anna Siwik955f197bbfcf
diff --git a/saleor/menu/models.py b/saleor/menu/models.py
index 8bf6acabdd..13de4eab43 100644
--- a/saleor/menu/models.py
+++ b/saleor/menu/models.py
@@ -78,7 +78,16 @@ class MenuItem(MPTTModel):
prefix = pgettext_lazy('Link object type description', 'URL: ')
return prefix + self.url
- prefix = linked_object.__class__._meta.verbose_name.title()
+ if linked_object.__class__ == Collection:
+ prefix = pgettext_lazy(
+ 'Link object type description', 'Collection: ')
+ elif linked_object.__class__ == Category:
+ prefix = pgettext_lazy(
+ 'Link object type description', 'Category: ')
+ else:
+ prefix = pgettext_lazy(
+ 'Link object type description', 'Page: ')
+
return prefix + str(linked_object)
def get_url(self):