소스 검색

[fix] [patch] re-route only if not a duplicate route, else ignore

version-14
Anand Doshi 9 년 전
부모
커밋
b3e6eca6da
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      frappe/patches/v7_0/re_route.py

+ 2
- 2
frappe/patches/v7_0/re_route.py 파일 보기

@@ -15,8 +15,8 @@ def update_routes(doctypes):
condition = 'where {0}=1'.format(c.website.condition_field) condition = 'where {0}=1'.format(c.website.condition_field)


try: 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)) if(ifnull(parent_website_route, "")="", "", "/"), page_name) {1}""".format(d, condition))


except Exception, e: except Exception, e:
if e.args[0]!=1054: raise e
if e.args[0]!=1054: raise

불러오는 중...
취소
저장