fix: hd view before_save logic

This commit is contained in:
Pratik
2026-03-12 22:53:52 +05:30
parent 41cee14a7e
commit 5ffc3a3a97
@@ -32,6 +32,13 @@ class HDView(Document):
def before_save(self):
self.toggle_pinned_public_view()
if self.is_standard and not (
frappe.conf.developer_mode
or frappe.flags.in_migrate
or frappe.flags.in_install
):
self.is_standard = 0
def on_trash(self):
if self.is_standard and not frappe.conf.developer_mode:
frappe.throw(_("Standard HD View cannot be deleted."))