Skip to content

Commit

Permalink
fix: Products top bar for webshop app (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Oct 17, 2023
1 parent b707a19 commit ab0c138
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions webshop/setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -207,7 +206,7 @@ def navbar_add_products_link():
},
)

return website_settings.save()
website_settings.save()


def say_thanks():
Expand Down

0 comments on commit ab0c138

Please sign in to comment.