diff --git a/notion/block/collection/basic.py b/notion/block/collection/basic.py index 403c921..655ea6a 100644 --- a/notion/block/collection/basic.py +++ b/notion/block/collection/basic.py @@ -131,7 +131,8 @@ def add_row(self, update_views=True, **kwargs) -> "CollectionRowBlock": if update_views: # make sure the new record is inserted at the end of each view for view in self.parent.views: - if isinstance(view, CalendarView): + # TODO: why we skip CalendarView? can we remove that 'if'? + if not view or isinstance(view, CalendarView): continue view.set("page_sort", view.get("page_sort", []) + [row_id])