From 5214ba75b99b591cf714aa3e7a66aa7994af98ce Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 17 Oct 2023 16:54:28 +0530 Subject: [PATCH] fix: Products top bar for webshop app --- webshop/setup/install.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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():