From d257629f81488eda74ca7dac8f9a8599736d87f8 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Mon, 8 Apr 2024 16:04:40 +0530 Subject: [PATCH] Handle case when properties field isn't present in the page --- src/khoj/processor/content/notion/notion_to_entries.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/khoj/processor/content/notion/notion_to_entries.py b/src/khoj/processor/content/notion/notion_to_entries.py index 422e8325..6e078f07 100644 --- a/src/khoj/processor/content/notion/notion_to_entries.py +++ b/src/khoj/processor/content/notion/notion_to_entries.py @@ -223,7 +223,8 @@ class NotionToEntries(TextToEntries): except Exception as e: logger.error(f"Error getting page {page_id}: {e}", exc_info=True) return None, None - properties = page["properties"] + properties = page.get("properties", {}) + title_field = "title" if "Title" in properties: title_field = "Title"