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, "project": Project,
"parent": Model, "parent": Model,
"framework": None, "framework": None,
"design": None, "design": dict,
"labels": dict, "labels": dict,
"ready": None, "ready": None,
"metadata": list, "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.bll.util import run_batch_operation, update_project_time
from apiserver.database.errors import translate_errors_context from apiserver.database.errors import translate_errors_context
from apiserver.database.model import EntityVisibility 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.output import Output
from apiserver.database.model.task.task import ( from apiserver.database.model.task.task import (
Task, Task,
@ -412,18 +413,19 @@ create_fields = {
"error": None, "error": None,
"comment": None, "comment": None,
"parent": Task, "parent": Task,
"project": None, "project": Project,
"input": None, "input": None,
"models": None, "models": None,
"container": None, "container": dict,
"output_dest": None, "output_dest": None,
"execution": None, "execution": None,
"hyperparams": None, "hyperparams": dict,
"configuration": None, "configuration": dict,
"script": None, "script": None,
"runtime": None, "runtime": dict,
} }
dict_fields_paths = [("execution", "model_labels"), "container"] dict_fields_paths = [("execution", "model_labels"), "container"]