Skip to content

Commit

Permalink
Calculate total for crawl QA page endpoint (#2435)
Browse files Browse the repository at this point in the history
Fixes #2434 

Patch fix for a regression in Browsertrix 1.4.0-1.4.1 where total was
not being calculated for QA page list endpoint but still being included
in response, which led to total always being 0 and pages not loading in
the frontend review screen as a result.
  • Loading branch information
tw4l authored Feb 27, 2025
1 parent 376c998 commit 45aa0a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions backend/btrixcloud/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,7 @@ async def get_pages_list_with_qa(
page=page,
sort_by=sortBy,
sort_direction=sortDirection,
include_total=True,
)
return paginated_format(pages, total, page, pageSize)

Expand Down
1 change: 1 addition & 0 deletions backend/test/test_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ def test_qa_page_data(
headers=crawler_auth_headers,
)
data = r.json()
assert data["total"] == 1
assert len(data["items"]) == 1
page = data["items"][0]

Expand Down

0 comments on commit 45aa0a3

Please sign in to comment.