From b97718bdf9272868670e7b7ee0da85fb1b889ddf Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 6 Dec 2024 18:16:14 +0530 Subject: [PATCH] fix: handle case where wiki page is not added to wiki space --- wiki/wiki/doctype/wiki_page/wiki_page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiki/wiki/doctype/wiki_page/wiki_page.py b/wiki/wiki/doctype/wiki_page/wiki_page.py index 4354c4a5..e4d6156f 100644 --- a/wiki/wiki/doctype/wiki_page/wiki_page.py +++ b/wiki/wiki/doctype/wiki_page/wiki_page.py @@ -205,7 +205,7 @@ def get_context(self, context): wiki_settings = frappe.get_single("Wiki Settings") wiki_space_name = frappe.get_value("Wiki Group Item", {"wiki_page": self.name}, "parent") - wiki_space = frappe.get_doc("Wiki Space", wiki_space_name) + wiki_space = frappe.get_doc("Wiki Space", wiki_space_name) if wiki_space_name else frappe._dict() context.no_cache = 1 context.navbar_search = wiki_settings.add_search_bar