[fix] [minor] create default web page only for first company

This commit is contained in:
Nabin Hait 2013-09-25 13:43:35 +05:30
parent 5c464e4a01
commit a7687e9ab6

View File

@ -68,7 +68,8 @@ class DocType:
}).insert()
def create_default_web_page(self):
if not webnotes.conn.get_value("Website Settings", None, "home_page"):
if not webnotes.conn.get_value("Website Settings", None, "home_page") and \
not webnotes.conn.sql("select name from tabCompany where name!=%s", self.doc.name):
import os
with open(os.path.join(os.path.dirname(__file__), "sample_home_page.html"), "r") as webfile:
webpage = webnotes.bean({