From 58a84d0bc00ce0b8211f6380d290b22fcc4c1c10 Mon Sep 17 00:00:00 2001 From: Narek Mkhitaryan Date: Mon, 22 May 2023 11:34:41 +0400 Subject: [PATCH] fix in http_client paginate function --- src/superannotate/lib/infrastructure/services/http_client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/superannotate/lib/infrastructure/services/http_client.py b/src/superannotate/lib/infrastructure/services/http_client.py index 97e4217e1..1105cfb8e 100644 --- a/src/superannotate/lib/infrastructure/services/http_client.py +++ b/src/superannotate/lib/infrastructure/services/http_client.py @@ -169,7 +169,10 @@ def paginate( res_data=pydantic.parse_obj_as(List[item_type], total), ) else: - response = ServiceResponse(res_data=total) + response = ServiceResponse( + status=_response.status, + res_data=total, + ) if not _response.ok: response.set_error(_response.error) response.status = _response.status