From bd0bc62f12e75c7326892ed72bc8c039d2e02d26 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 22 Oct 2020 13:11:44 +0530 Subject: [PATCH] fix: patch not able to delete standard report --- frappe/core/doctype/report/report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)