mirror of
https://github.com/hanzoai/helpdesk.git
synced 2026-10-12 16:56:02 +00:00
fix: improve update function
This commit is contained in:
@@ -110,10 +110,8 @@ def add_default_views(for_existing_sites=False):
|
||||
def update_default_views():
|
||||
"""Update standard views with latest definitions."""
|
||||
for view in default_views:
|
||||
view_name = view["name"]
|
||||
|
||||
if frappe.db.exists("HD View", view_name):
|
||||
doc = frappe.get_doc("HD View", view_name)
|
||||
if frappe.db.exists("HD View", view["name"]):
|
||||
doc = frappe.get_doc("HD View", view)
|
||||
doc.update(
|
||||
{
|
||||
"columns": view["columns"],
|
||||
|
||||
Reference in New Issue
Block a user