This commit is contained in:
student_2333 2024-11-04 11:27:05 +08:00
parent 4d602fffd7
commit 6f55debc8a
No known key found for this signature in database
GPG Key ID: 665F083BEC56F2A6

View File

@ -115,6 +115,8 @@ class ModelUpdater(ABC):
path = self.get_path(info.filename)
if not (p := path.parent).exists():
p.mkdir(parents=True)
if path.exists():
path.unlink()
tmp_path.rename(path)
def validate(self, path: Path, info: ModelInfo) -> Any: # noqa: ARG002