[minor] fix-patch
This commit is contained in:
parent
834541a7e8
commit
5171da81a1
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user