Calculate total for crawl QA page endpoint (#2435)
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.
This commit is contained in:
parent
376c9981dc
commit
45aa0a32b6
@ -1404,6 +1404,7 @@ def init_pages_api(
|
|||||||
page=page,
|
page=page,
|
||||||
sort_by=sortBy,
|
sort_by=sortBy,
|
||||||
sort_direction=sortDirection,
|
sort_direction=sortDirection,
|
||||||
|
include_total=True,
|
||||||
)
|
)
|
||||||
return paginated_format(pages, total, page, pageSize)
|
return paginated_format(pages, total, page, pageSize)
|
||||||
|
|
||||||
|
@ -254,6 +254,7 @@ def test_qa_page_data(
|
|||||||
headers=crawler_auth_headers,
|
headers=crawler_auth_headers,
|
||||||
)
|
)
|
||||||
data = r.json()
|
data = r.json()
|
||||||
|
assert data["total"] == 1
|
||||||
assert len(data["items"]) == 1
|
assert len(data["items"]) == 1
|
||||||
page = data["items"][0]
|
page = data["items"][0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user