Merge pull request #25406 from ankush/workspace_rename
fix: handle parent rename in child workspace
This commit is contained in:
commit
f6a626c156
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue