Check for dictionary type for some model and task fields

This commit is contained in:
allegroai 2024-01-10 15:10:41 +02:00
parent a604451b01
commit 262a301e28
2 changed files with 8 additions and 6 deletions

View File

@ -193,7 +193,7 @@ create_fields = {
"project": Project,
"parent": Model,
"framework": None,
"design": None,
"design": dict,
"labels": dict,
"ready": None,
"metadata": list,

View File

@ -110,6 +110,7 @@ from apiserver.bll.task.utils import (
from apiserver.bll.util import run_batch_operation, update_project_time
from apiserver.database.errors import translate_errors_context
from apiserver.database.model import EntityVisibility
from apiserver.database.model.project import Project
from apiserver.database.model.task.output import Output
from apiserver.database.model.task.task import (
Task,
@ -412,18 +413,19 @@ create_fields = {
"error": None,
"comment": None,
"parent": Task,
"project": None,
"project": Project,
"input": None,
"models": None,
"container": None,
"container": dict,
"output_dest": None,
"execution": None,
"hyperparams": None,
"configuration": None,
"hyperparams": dict,
"configuration": dict,
"script": None,
"runtime": None,
"runtime": dict,
}
dict_fields_paths = [("execution", "model_labels"), "container"]