mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix: use db sql to delete property setter
This commit is contained in:
@@ -607,3 +607,4 @@ execute:frappe.delete_doc_if_exists("Page", "support-analytics")
|
|||||||
erpnext.patches.v12_0.make_item_manufacturer
|
erpnext.patches.v12_0.make_item_manufacturer
|
||||||
erpnext.patches.v12_0.set_quotation_status
|
erpnext.patches.v12_0.set_quotation_status
|
||||||
erpnext.patches.v12_0.set_priority_for_support
|
erpnext.patches.v12_0.set_priority_for_support
|
||||||
|
erpnext.patches.v12_0.delete_priority_property_setter
|
||||||
|
|||||||
9
erpnext/patches/v12_0/delete_priority_property_setter.py
Normal file
9
erpnext/patches/v12_0/delete_priority_property_setter.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
frappe.db.sql("""
|
||||||
|
DELETE FROM `tabProperty Setter`
|
||||||
|
WHERE `tabProperty Setter`.doc_type='Issue'
|
||||||
|
AND `tabProperty Setter`.field_name='priority'
|
||||||
|
AND `tabProperty Setter`.property='options'
|
||||||
|
""")
|
||||||
@@ -18,8 +18,6 @@ def set_issue_priority():
|
|||||||
"name": priority
|
"name": priority
|
||||||
}).insert(ignore_permissions=True)
|
}).insert(ignore_permissions=True)
|
||||||
|
|
||||||
frappe.delete_doc_if_exists("Property Setter", {"field_name": "priority", "property": "options"})
|
|
||||||
|
|
||||||
def set_priority_for_issue():
|
def set_priority_for_issue():
|
||||||
# Sets priority for Issues as Select field is changed to Link field.
|
# Sets priority for Issues as Select field is changed to Link field.
|
||||||
issue_priority = frappe.get_list("Issue", fields=["name", "priority"])
|
issue_priority = frappe.get_list("Issue", fields=["name", "priority"])
|
||||||
|
|||||||
Reference in New Issue
Block a user