Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandf committed Nov 29, 2023
1 parent 90337fb commit 50bb2b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/src/backend/services/TaskService.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,17 @@ def _recursive_pydantic_model_to_dict(self, obj):
if type(obj) == list:
items = []
for item in obj:
items.append(self.recursive_pydantic_model_to_dict(item))
items.append(self._recursive_pydantic_model_to_dict(item))
return items
if type(obj) == dict:
modified_dict = {}
for key in obj:
modified_dict[key] = self.recursive_pydantic_model_to_dict(obj[key])
modified_dict[key] = self._recursive_pydantic_model_to_dict(obj[key])
return modified_dict
if isinstance(obj, BaseModel):
dict_obj = obj.dict()
for key in obj:
dict_obj[key] = self.recursive_pydantic_model_to_dict(dict_obj[key])
dict_obj[key] = self._recursive_pydantic_model_to_dict(dict_obj[key])
return dict_obj

return obj
Expand Down

0 comments on commit 50bb2b8

Please sign in to comment.