From daeceb8696d0ddc9c7a433eba3f152883c2125ad Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 18 Feb 2014 16:11:23 +0530 Subject: [PATCH] minor fix in website sitemap --- frappe/website/doctype/website_sitemap/website_sitemap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/website/doctype/website_sitemap/website_sitemap.py b/frappe/website/doctype/website_sitemap/website_sitemap.py index 641b27af36..33d3839012 100644 --- a/frappe/website/doctype/website_sitemap/website_sitemap.py +++ b/frappe/website/doctype/website_sitemap/website_sitemap.py @@ -37,7 +37,7 @@ class DocType(DocTypeNestedSet): where parent_website_sitemap=%s and name!=%s""", (self.doc.parent_website_sitemap, self.doc.name))[0][0] or 0) + 1 else: - if self.doc.idx != 0: + if self.doc.idx != 0 and self.doc.parent_website_sitemap: if not frappe.conn.get_value("Website Sitemap", { "idx": self.doc.idx -1, "parent_website_sitemap":self.doc.parent_website_sitemap