minor patch fix

This commit is contained in:
Nabin Hait 2016-09-20 18:19:50 +05:30
parent 9f4ca1fb9e
commit 5cf5019b89

View File

@ -13,7 +13,7 @@ def execute():
header = frappe.db.get_value('Web Page', website_settings.home_page, 'header') header = frappe.db.get_value('Web Page', website_settings.home_page, 'header')
if header and header.startswith("<div class='hero text-center'>"): if header and header.startswith("<div class='hero text-center'>"):
homepage = frappe.get_doc('Homepage', 'Homepage') homepage = frappe.get_doc('Homepage', 'Homepage')
homepage.company = erpnext.get_default_company() homepage.company = erpnext.get_default_company() or frappe.get_all("Company")[0].name
if '<h1>' in header: if '<h1>' in header:
homepage.tag_line = header.split('<h1>')[1].split('</h1>')[0] or 'Default Website' homepage.tag_line = header.split('<h1>')[1].split('</h1>')[0] or 'Default Website'
else: else: