Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove redundant method
oldPadavand8aacaa67169
diff --git a/saleor/dashboard/menu/utils.py b/saleor/dashboard/menu/utils.pyindex 66500235b7..1fe4a996f8 100644--- a/saleor/dashboard/menu/utils.py+++ b/saleor/dashboard/menu/utils.py@@ -95,7 +95,7 @@ def get_menus_that_needs_update(collection=None, categories=None, page=None):def get_menu_obj_text(obj):- if obj.is_published:+ if getattr(obj, 'is_published', True):return str(obj)elif isinstance(obj, Page) and obj.is_visible and obj.available_on:return pgettext(diff --git a/saleor/menu/models.py b/saleor/menu/models.pyindex 3f1fd8b57a..41b63328f2 100644--- a/saleor/menu/models.py+++ b/saleor/menu/models.py@@ -85,7 +85,8 @@ class MenuItem(MPTTModel, SortableModel):return linked_object.get_absolute_url() if linked_object else self.urldef is_public(self):- return not self.linked_object or self.linked_object.is_published+ return not self.linked_object or getattr(+ self.linked_object, 'is_published', True)class MenuItemTranslation(models.Model):diff --git a/saleor/product/models.py b/saleor/product/models.pyindex 0741aa99a9..e8031c833b 100644--- a/saleor/product/models.py+++ b/saleor/product/models.py@@ -52,10 +52,6 @@ class Category(MPTTModel, SeoModel):'product:category',kwargs={'slug': self.slug, 'category_id': self.id})- @property- def is_published(self):- return True-class CategoryTranslation(SeoModelTranslation):language_code = models.CharField(max_length=10)