From 1783549e758e8137fa53449100150fbbc2996092 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 17 Nov 2017 12:20:07 +0530 Subject: [PATCH] Minor fixes in patch --- erpnext/patches/v9_1/create_issue_opportunity_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v9_1/create_issue_opportunity_type.py b/erpnext/patches/v9_1/create_issue_opportunity_type.py index af7ee5d6c3..5b3819b956 100644 --- a/erpnext/patches/v9_1/create_issue_opportunity_type.py +++ b/erpnext/patches/v9_1/create_issue_opportunity_type.py @@ -25,7 +25,7 @@ def execute(): for opts in (('Issue', 'issue_type', 'Issue Type'), ('Opportunity', 'opportunity_type', 'Opportunity Type')): for d in frappe.db.sql('select distinct {0} from `tab{1}`'.format(opts[1], opts[0])): - if not frappe.db.exists(opts[2], d[0]): + if d[0] and not frappe.db.exists(opts[2], d[0]): frappe.get_doc(dict(doctype = opts[2], name=d[0])).insert() # fixtures