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

Merge pull request #457 from MaxMorais/patch-3

Fix  _mysql_exceptions.ProgrammingError: (1146, "Table 'wnmax.tabNone' d...
version-14
Nabin Hait 11 лет назад
Родитель
Сommit
16b8081a75
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      frappe/website/doctype/website_sitemap/website_sitemap.py

+ 2
- 2
frappe/website/doctype/website_sitemap/website_sitemap.py Просмотреть файл

@@ -38,7 +38,7 @@ class DocType(DocTypeNestedSet):
if self.doc.old_parent != self.doc.parent_website_sitemap:
frappe.conn.sql("""update `tabWebsite Sitemap` set idx=idx-1
where parent_website_sitemap=%s and idx>%s""", (self.doc.old_parent, self.doc.idx))
frappe.conn.sql("""update `tab{}` set idx=idx-1
frappe.conn.sql("""update `tab{0}` set idx=idx-1
where parent_website_sitemap=%s and idx>%s""".format(self.doc.ref_doctype),
(self.doc.old_parent, self.doc.idx))
self.doc.idx = None
@@ -160,4 +160,4 @@ def cleanup_sitemap():
where not exists(select name from `tabWebsite Sitemap Config` wsc
where wsc.name=ws.website_sitemap_config)""")
frappe.delete_doc("Website Sitemap", to_delete, ignore_permissions=True)
frappe.delete_doc("Website Sitemap", to_delete, ignore_permissions=True)

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