Skip to content

Commit

Permalink
Fix checking the last page
Browse files Browse the repository at this point in the history
  • Loading branch information
tedkimdev committed Jul 22, 2023
1 parent 0894fb9 commit 21b6c37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/backend/database/mongo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ func (c *Client) listProjectInfos(
return nil, fmt.Errorf("fetch project infos: %w", err)
}

if cursor.RemainingBatchLength() == 0 {
isLastPage := len(infos) < pageSize
if isLastPage {
c.housekeepingProjectPage = 0
}

Expand Down

0 comments on commit 21b6c37

Please sign in to comment.