From 8d133ce32accfbc600d312484fbeae80029a0e2a Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 3 Feb 2023 12:40:24 +0530 Subject: [PATCH] fix: Ignore route conflict validations during migrate --- frappe/desk/utils.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/frappe/desk/utils.py b/frappe/desk/utils.py index 428ed95c02..77edf88d7a 100644 --- a/frappe/desk/utils.py +++ b/frappe/desk/utils.py @@ -9,16 +9,14 @@ def validate_route_conflict(doctype, name): Raises exception if name clashes with routes from other documents for /app routing """ + if frappe.flags.in_migrate: + return + all_names = [] for _doctype in ["Page", "Workspace", "DocType"]: - try: - all_names.extend( - [ - slug(d) for d in frappe.get_all(_doctype, pluck="name") if (doctype != _doctype and d != name) - ] - ) - except frappe.db.TableMissingError: - pass + all_names.extend( + [slug(d) for d in frappe.get_all(_doctype, pluck="name") if (doctype != _doctype and d != name)] + ) if slug(name) in all_names: frappe.msgprint(frappe._("Name already taken, please set a new name"))