From 5171da81a11ac7b21837424182034a65eceaa3b9 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 21 Nov 2017 15:18:47 +0530 Subject: [PATCH] [minor] fix-patch --- erpnext/patches/v9_1/create_issue_opportunity_type.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/patches/v9_1/create_issue_opportunity_type.py b/erpnext/patches/v9_1/create_issue_opportunity_type.py index 5b3819b956..aa8bbd1e79 100644 --- a/erpnext/patches/v9_1/create_issue_opportunity_type.py +++ b/erpnext/patches/v9_1/create_issue_opportunity_type.py @@ -7,8 +7,8 @@ from frappe import _ def execute(): # delete custom field if exists - for fieldname in ('issue_type', 'opportunity_type'): - custom_field = frappe.db.get_value("Custom Field", {"fieldname": fieldname}) + for doctype, fieldname in (('Issue', 'issue_type'), ('Opportunity', 'opportunity_type')): + custom_field = frappe.db.get_value("Custom Field", {"fieldname": fieldname, 'dt': doctype}) if custom_field: frappe.delete_doc("Custom Field", custom_field, ignore_permissions=True)