diff --git a/frappe/core/doctype/report/report.py b/frappe/core/doctype/report/report.py index 8634ad1084..213410bfe3 100644 --- a/frappe/core/doctype/report/report.py +++ b/frappe/core/doctype/report/report.py @@ -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)