@@ -47,15 +47,23 @@ def _request_annotations(endpoint: Endpoint, cvat_id: int, format_name: str) ->
4747 _get_annotations(request_id, ...)
4848 """
4949
50- (_ , response ) = endpoint .call_with_http_info (
51- id = cvat_id ,
52- format = format_name ,
53- save_images = False ,
54- _parse_response = False ,
55- )
50+ try :
51+ (_ , response ) = endpoint .call_with_http_info (
52+ id = cvat_id ,
53+ format = format_name ,
54+ save_images = False ,
55+ _parse_response = False ,
56+ )
57+
58+ assert response .status in [HTTPStatus .ACCEPTED , HTTPStatus .CREATED ]
59+ rq_id = response .json ()["rq_id" ]
60+ except exceptions .ApiException as e :
61+ if e .status == HTTPStatus .CONFLICT :
62+ rq_id = json .loads (e .body )["rq_id" ]
63+ else :
64+ raise
5665
57- assert response .status in [HTTPStatus .ACCEPTED , HTTPStatus .CREATED ]
58- return response .json ()["rq_id" ]
66+ return rq_id
5967
6068
6169def _get_annotations (
@@ -462,6 +470,7 @@ def fetch_task_jobs(task_id: int) -> list[models.JobRead]:
462470 api_client .jobs_api .list_endpoint ,
463471 task_id = task_id ,
464472 type = "annotation" ,
473+ page_size = Config .cvat_config .jobs_page_size ,
465474 )
466475 except exceptions .ApiException as e :
467476 logger .exception (f"Exception when calling JobsApi.list: { e } \n " )
@@ -535,6 +544,7 @@ def fetch_projects(assignee: str = "") -> list[models.ProjectRead]:
535544 return get_paginated_collection (
536545 api_client .projects_api .list_endpoint ,
537546 ** ({"assignee" : assignee } if assignee else {}),
547+ page_size = Config .cvat_config .projects_page_size ,
538548 )
539549 except exceptions .ApiException as e :
540550 logger .exception (f"Exception when calling ProjectsApi.list(): { e } \n " )
@@ -711,6 +721,7 @@ def update_quality_control_settings(
711721 logger = logging .getLogger ("app" )
712722
713723 params = {
724+ "inherit" : False ,
714725 "max_validations_per_job" : max_validations_per_job ,
715726 "target_metric" : target_metric ,
716727 "target_metric_threshold" : target_metric_threshold ,
0 commit comments