From 0296b90c65e78cc45dae2296e5ce2059678def47 Mon Sep 17 00:00:00 2001 From: Teddy Wahle Date: Thu, 1 May 2025 17:34:31 -0700 Subject: [PATCH] Fix broken sync when Notion callout has no Icon --- .../processes/connectors/notion/types/blocks/callout.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unstructured_ingest/processes/connectors/notion/types/blocks/callout.py b/unstructured_ingest/processes/connectors/notion/types/blocks/callout.py index a685f839a..7f75ef90c 100644 --- a/unstructured_ingest/processes/connectors/notion/types/blocks/callout.py +++ b/unstructured_ingest/processes/connectors/notion/types/blocks/callout.py @@ -76,9 +76,11 @@ def can_have_children() -> bool: @classmethod def from_dict(cls, data: dict): rich_text = data.pop("rich_text", []) + icon_data = data.pop("icon", None) + icon = Icon.from_dict(icon_data) if icon_data else None return cls( color=data["color"], - icon=Icon.from_dict(data.pop("icon")), + icon=icon, rich_text=[RichText.from_dict(rt) for rt in rich_text], )