fix(install): do not use deprecated pydantic methods

This commit is contained in:
psychedelicious 2024-03-11 23:31:29 +11:00
parent 3d1f3818cb
commit b4b0af7c60

View File

@ -149,7 +149,7 @@ class InstallHelper(object):
"""
# previously-installed models
for model in self._installer.record_store.all_models():
info = UnifiedModelInfo.parse_obj(model.dict())
info = UnifiedModelInfo.model_validate(model.model_dump())
info.installed = True
model_key = f"{model.base.value}/{model.type.value}/{model.name}"
self.all_models[model_key] = info
@ -183,7 +183,7 @@ class InstallHelper(object):
# previously-installed models
for model in self._installer.record_store.all_models():
info = UnifiedModelInfo.parse_obj(model.dict())
info = UnifiedModelInfo.model_validate(model.model_dump())
info.installed = True
model_key = f"{model.base.value}/{model.type.value}/{model.name}"
self.all_models[model_key] = info