Просмотр исходного кода

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

version-14
Anand Doshi 9 лет назад
Родитель
Сommit
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)

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

Загрузка…
Отмена
Сохранить