File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed
packages/models-library/src/models_library
services/storage/src/simcore_service_storage/modules/db Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -111,18 +111,6 @@ class BaseProjectModel(BaseModel):
111111 # NOTE: GCR: a validation failed (See: services/storage/src/simcore_service_storage/modules/db/projects.py)
112112 workbench : Annotated [NodesDict , Field (description = "Project's pipeline" )]
113113
114- @classmethod
115- def model_validate_ignoring_workbench (cls , obj : Any ):
116- if isinstance (obj , dict ):
117- data = dict (obj )
118- data .pop ("workbench" , None )
119- else :
120- data = obj
121- model = cls .model_validate (data )
122- if isinstance (obj , dict ) and "workbench" in obj :
123- model .workbench = obj ["workbench" ]
124- return model
125-
126114
127115class ProjectAtDB (BaseProjectModel ):
128116 # Model used to READ from database
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ async def list_valid_projects_in(
3131 )
3232 ):
3333 with suppress (ValidationError ):
34- yield ProjectAtDB .model_validate_ignoring_workbench (row ._asdict ())
34+ # FIXME: remove workbench once model is fixed
35+ yield ProjectAtDB .model_validate (row ._asdict () | {"workbench" : {}})
3536
3637 async def get_project_id_and_node_id_to_names_map (
3738 self ,
You can’t perform that action at this time.
0 commit comments