Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Products top bar for webshop app #30

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading