mirror of
https://github.com/hanzoai/helpdesk.git
synced 2026-10-12 16:56:02 +00:00
fix: hd view before_save logic
This commit is contained in:
@@ -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."))
|
||||
|
||||
Reference in New Issue
Block a user