mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Handle case when properties field isn't present in the page
This commit is contained in:
parent
9b68062fa9
commit
d257629f81
1 changed files with 2 additions and 1 deletions
|
@ -223,7 +223,8 @@ class NotionToEntries(TextToEntries):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error getting page {page_id}: {e}", exc_info=True)
|
logger.error(f"Error getting page {page_id}: {e}", exc_info=True)
|
||||||
return None, None
|
return None, None
|
||||||
properties = page["properties"]
|
properties = page.get("properties", {})
|
||||||
|
|
||||||
title_field = "title"
|
title_field = "title"
|
||||||
if "Title" in properties:
|
if "Title" in properties:
|
||||||
title_field = "Title"
|
title_field = "Title"
|
||||||
|
|
Loading…
Add table
Reference in a new issue