diff --git a/src/robusta/core/reporting/blocks.py b/src/robusta/core/reporting/blocks.py index 0805d1444..d4dfe7e24 100644 --- a/src/robusta/core/reporting/blocks.py +++ b/src/robusta/core/reporting/blocks.py @@ -443,13 +443,13 @@ def grade(self): class EventRow(BaseModel): - type: str - reason: str - message: str + type: Optional[str] + reason: Optional[str] + message: Optional[str] kind: str name: str namespace: str - time: str + time: Optional[str] class EventsBlock(TableBlock): diff --git a/src/robusta/core/sinks/robusta/dal/supabase_dal.py b/src/robusta/core/sinks/robusta/dal/supabase_dal.py index f737c1b3f..4d66b15c2 100644 --- a/src/robusta/core/sinks/robusta/dal/supabase_dal.py +++ b/src/robusta/core/sinks/robusta/dal/supabase_dal.py @@ -562,7 +562,7 @@ def publish_cluster_nodes(self, node_count: int): def persist_events_block(self, block: EventsBlock): db_events = [] for event in block.events: - row = event.dict() + row = event.dict(exclude_none=True) row["account_id"] = self.account_id row["cluster_id"] = self.cluster db_events.append(row)