Skip to content

Commit

Permalink
skip "first" link from first page
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Aug 29, 2023
1 parent 4f68111 commit ad69308
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions share/search/index_strategy/trove_indexcard_flats.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,8 @@ def prev_cursor(self) -> str | None:
)

def first_cursor(self) -> str | None:
if self.is_first_page():
return None
return encode_cursor_dataclass(dataclasses.replace(self, start_index=0))

def is_first_page(self) -> bool:
Expand Down

0 comments on commit ad69308

Please sign in to comment.