mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
[minor] fix-patch
This commit is contained in:
@@ -7,8 +7,8 @@ from frappe import _
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
# delete custom field if exists
|
# delete custom field if exists
|
||||||
for fieldname in ('issue_type', 'opportunity_type'):
|
for doctype, fieldname in (('Issue', 'issue_type'), ('Opportunity', 'opportunity_type')):
|
||||||
custom_field = frappe.db.get_value("Custom Field", {"fieldname": fieldname})
|
custom_field = frappe.db.get_value("Custom Field", {"fieldname": fieldname, 'dt': doctype})
|
||||||
if custom_field:
|
if custom_field:
|
||||||
frappe.delete_doc("Custom Field", custom_field, ignore_permissions=True)
|
frappe.delete_doc("Custom Field", custom_field, ignore_permissions=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user