Force delete item on deletion of Lab test template (#15079)

This commit is contained in:
Shreya Shah 2018-08-06 14:43:00 +05:30 committed by Nabin Hait
parent f0ef673498
commit 11dd3ffdb5

View File

@ -34,7 +34,7 @@ class LabTestTemplate(Document):
# remove template refernce from item and disable item
if(self.item):
try:
frappe.delete_doc("Item",self.item)
frappe.delete_doc("Item",self.item, force=True)
except Exception:
frappe.throw("""Not permitted. Please disable the Test Template""")