Skip to content

Commit d3f1b51

Browse files
sync: canary changes to preview
2 parents b03844e + e624a17 commit d3f1b51

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apiserver/plane/utils/paginator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ def get_result(self, limit=1000, cursor=None):
150150
raise BadPaginationError("Pagination offset cannot be negative")
151151

152152
results = queryset[offset:stop]
153+
# Duplicate the queryset so it does not evaluate on any python ops
154+
page_results = queryset[offset:stop].values("id")
153155

154156
# Only slice from the end if we're going backwards (previous page)
155157
if cursor.value != limit and cursor.is_prev:
@@ -164,7 +166,7 @@ def get_result(self, limit=1000, cursor=None):
164166
# Check if there are more results available after the current page
165167

166168
# Adjust cursors based on the results for pagination
167-
next_cursor = Cursor(limit, page + 1, False, len(results) > limit)
169+
next_cursor = Cursor(limit, page + 1, False, page_results.count() > limit)
168170
# If the page is greater than 0, then set the previous cursor
169171
prev_cursor = Cursor(limit, page - 1, True, page > 0)
170172

web/ce/components/projects/settings/intake/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const ProjectInboxHeader: FC = observer(() => {
3636
return (
3737
<Header>
3838
<Header.LeftItem>
39-
<div className="flex items-center gap-4 flex-grow border">
39+
<div className="flex items-center gap-4 flex-grow">
4040
<Breadcrumbs isLoading={currentProjectDetailsLoader === "init-loader"}>
4141
<CommonProjectBreadcrumbs
4242
workspaceSlug={workspaceSlug?.toString() ?? ""}

0 commit comments

Comments
 (0)