fix: unlink item from healthcare service unit type (#22828)
Co-authored-by: Marica <maricadsouza221197@gmail.com>
This commit is contained in:
parent
00f25842d0
commit
621529adfb
@ -39,7 +39,9 @@ class HealthcareServiceUnitType(Document):
|
||||
def on_trash(self):
|
||||
if self.item:
|
||||
try:
|
||||
frappe.delete_doc('Item', self.item)
|
||||
item = self.item
|
||||
self.db_set('item', '')
|
||||
frappe.delete_doc('Item', item)
|
||||
except Exception:
|
||||
frappe.throw(_('Not permitted. Please disable the Service Unit Type'))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user