def home_page_is_products(doc, method):
 home_page_is_products = cint(frappe.db.get_single_value(u'Products Settings', u'home_page_is_products'))
 if home_page_is_products:
  doc.home_page = u'products'

def home_page_is_products ( doc , method ) : home_page_is_products = cint ( frappe . db . get_single_value ( u'Products Settings' , u'home_page_is_products' ) ) if home_page_is_products : doc . home_page = u'products'
called on saving website settings .