Change parse_obj calls to use model_validate per new pydantic specification

This commit is contained in:
sabaimran
2023-11-18 12:10:36 -08:00
parent ebdb423d3e
commit 5de2ab6098
3 changed files with 3 additions and 3 deletions

View File

@@ -122,7 +122,7 @@ async def map_config_to_db(config: FullConfig, user: KhojUser):
def _initialize_config():
if state.config is None:
state.config = FullConfig()
state.config.search_type = SearchConfig.parse_obj(constants.default_config["search-type"])
state.config.search_type = SearchConfig.model_validate(constants.default_config["search-type"])
@api.get("/config/data", response_model=FullConfig)