diff --git a/webshop/setup/install.py b/webshop/setup/install.py index 3d3d5c45cd..825ca40497 100644 --- a/webshop/setup/install.py +++ b/webshop/setup/install.py @@ -193,9 +193,8 @@ def add_custom_fields(): return create_custom_fields(custom_fields) def navbar_add_products_link(): - website_settings = frappe.get_single("Website Settings") - - if not website_settings: + website_settings = frappe.get_doc("Website Settings") + if website_settings.top_bar_items: return website_settings.append( @@ -207,7 +206,7 @@ def navbar_add_products_link(): }, ) - return website_settings.save() + website_settings.save() def say_thanks():