ソースを参照

Merge pull request #457 from MaxMorais/patch-3

Fix  _mysql_exceptions.ProgrammingError: (1146, "Table 'wnmax.tabNone' d...
version-14
Nabin Hait 11年前
コミット
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)

読み込み中…
キャンセル
保存