File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
services/director-v2/src/simcore_service_director_v2/utils Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 1- import json
21import logging
32from typing import Any
43
4+ from common_library .serialization import model_dump_with_secrets
55from fastapi import FastAPI
66from models_library .clusters import BaseCluster
77from models_library .projects_state import RunningState
3030
3131
3232def to_clusters_db (cluster : BaseCluster , * , only_update : bool ) -> dict [str , Any ]:
33- db_model : dict [str , Any ] = json .loads (
34- cluster .json (
35- by_alias = True ,
36- exclude = {"id" , "access_rights" },
37- exclude_unset = only_update ,
38- exclude_none = only_update ,
39- encoder = create_json_encoder_wo_secrets (BaseCluster ),
40- )
33+ db_model : dict [str , Any ] = model_dump_with_secrets (
34+ cluster ,
35+ show_secrets = True ,
36+ by_alias = True ,
37+ exclude = {"id" , "access_rights" },
38+ exclude_unset = only_update ,
39+ exclude_none = only_update ,
4140 )
4241 return db_model
4342
You can’t perform that action at this time.
0 commit comments