Skip to content

Commit 8091912

Browse files
collection/basic: sort if view exists (backport of jamalex#205)
1 parent 2eb97c3 commit 8091912

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

notion/block/collection/basic.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def add_row(self, update_views=True, **kwargs) -> "CollectionRowBlock":
131131
if update_views:
132132
# make sure the new record is inserted at the end of each view
133133
for view in self.parent.views:
134-
if isinstance(view, CalendarView):
134+
# TODO: why we skip CalendarView? can we remove that 'if'?
135+
if not view or isinstance(view, CalendarView):
135136
continue
136137
view.set("page_sort", view.get("page_sort", []) + [row_id])
137138

0 commit comments

Comments
 (0)