Merge pull request #25406 from ankush/workspace_rename

fix: handle parent rename in child workspace
This commit is contained in:
Ankush Menat 2024-03-13 20:51:44 +05:30 committed by GitHub
commit f6a626c156
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -299,6 +299,7 @@ def update_page(name, title, icon, indicator_color, parent, public):
)
if doc:
child_docs = frappe.get_all("Workspace", filters={"parent_page": doc.title, "public": doc.public})
doc.title = title
doc.icon = icon
doc.indicator_color = indicator_color
@ -314,7 +315,6 @@ def update_page(name, title, icon, indicator_color, parent, public):
rename_doc("Workspace", name, new_name, force=True, ignore_permissions=True)
# update new name and public in child pages
child_docs = frappe.get_all("Workspace", filters={"parent_page": doc.title, "public": doc.public})
if child_docs:
for child in child_docs:
child_doc = frappe.get_doc("Workspace", child.name)