From a7687e9ab6de284bb7b9f1c1224466e238d9219c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 25 Sep 2013 13:43:35 +0530 Subject: [PATCH] [fix] [minor] create default web page only for first company --- setup/doctype/company/company.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py index 220c48051c..9746eb240b 100644 --- a/setup/doctype/company/company.py +++ b/setup/doctype/company/company.py @@ -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({