From b3e6eca6da569663d61731cabd24c405aedf413e Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 29 Jun 2016 15:28:05 +0530 Subject: [PATCH] [fix] [patch] re-route only if not a duplicate route, else ignore --- frappe/patches/v7_0/re_route.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/patches/v7_0/re_route.py b/frappe/patches/v7_0/re_route.py index 7e2bf2fcca..9720b6618a 100644 --- a/frappe/patches/v7_0/re_route.py +++ b/frappe/patches/v7_0/re_route.py @@ -15,8 +15,8 @@ def update_routes(doctypes): condition = 'where {0}=1'.format(c.website.condition_field) try: - frappe.db.sql("""update `tab{0}` set route = concat(ifnull(parent_website_route, ""), + frappe.db.sql("""update ignore `tab{0}` set route = concat(ifnull(parent_website_route, ""), if(ifnull(parent_website_route, "")="", "", "/"), page_name) {1}""".format(d, condition)) except Exception, e: - if e.args[0]!=1054: raise e + if e.args[0]!=1054: raise