fix: route conflict not detected when workspace matches existing DocType
This commit is contained in:
parent
088ae90c9f
commit
b969282e8f
1 changed files with 5 additions and 1 deletions
|
|
@ -17,7 +17,11 @@ def validate_route_conflict(doctype, name):
|
|||
all_names = []
|
||||
for _doctype in ["Page", "Workspace", "DocType"]:
|
||||
all_names.extend(
|
||||
[slug(d) for d in frappe.get_all(_doctype, pluck="name") if (doctype != _doctype and d != name)]
|
||||
[
|
||||
slug(d)
|
||||
for d in frappe.get_all(_doctype, pluck="name")
|
||||
if not (doctype == _doctype and d == name)
|
||||
]
|
||||
)
|
||||
|
||||
if slug(name) in all_names:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue