fix: patch not able to delete standard report
This commit is contained in:
parent
6f9517864a
commit
bd0bc62f12
1 changed files with 2 additions and 1 deletions
|
|
@ -49,7 +49,8 @@ class Report(Document):
|
|||
self.export_doc()
|
||||
|
||||
def on_trash(self):
|
||||
if self.is_standard == 'Yes' and not cint(getattr(frappe.local.conf, 'developer_mode',0)):
|
||||
if (self.is_standard == 'Yes' and
|
||||
not cint(getattr(frappe.local.conf, 'developer_mode',0)) and not frappe.flags.in_patch):
|
||||
frappe.throw(_("You are not allowed to delete Standard Report"))
|
||||
delete_custom_role('report', self.name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue