Skip to content

Commit

Permalink
Reset home page based on product settings (#22875)
Browse files Browse the repository at this point in the history
  • Loading branch information
nabinhait authored Aug 3, 2020
1 parent 4cc9928 commit 9cc2d34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/portal/doctype/products_settings/products_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
class ProductsSettings(Document):
def validate(self):
if self.home_page_is_products:
frappe.db.set_value("Website Settings", "home_page", "products")
frappe.db.set_value("Website Settings", None, "home_page", "products")
elif frappe.db.get_single_value("Website Settings", "home_page") == 'products':
frappe.db.set_value("Website Settings", "home_page", "home")
frappe.db.set_value("Website Settings", None, "home_page", "home")

self.validate_field_filters()
self.validate_attribute_filters()
Expand Down

0 comments on commit 9cc2d34

Please sign in to comment.