Skip to content

Commit 966223f

Browse files
HNicolasNicolas Hervé
andauthored
fix(sup-1998): only cast CategoryList once per job (#1830)
Co-authored-by: Nicolas Hervé <[email protected]>
1 parent 5a21cdf commit 966223f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/kili/services/label_data_parsing/job_response.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def __init__(self, job_name: str, project_info: Project, job_payload: Dict) -> N
3333
self._job_interface = project_info["jsonInterface"][job_name] # type: ignore
3434

3535
# cast lists to objects
36-
if "categories" in self._json_data:
36+
if "categories" in self._json_data and not isinstance(
37+
self._json_data["categories"], category_module.CategoryList
38+
):
3739
self._json_data["categories"] = category_module.CategoryList(
3840
job_name=self._job_name,
3941
project_info=self._project_info,

0 commit comments

Comments
 (0)