Pydantic v2 migration

This commit is contained in:
grossmj committed 2023-08-04 18:20:06 +10:00
1 parent 11f51b3809
commit 9c456532d0
46 files changed
+221 -277

No files matched your search

+1 -1
View File
@@ -2645,7 +2645,7 @@ class QemuVM(BaseNode):
def asdict(self):
answer = {"project_id": self.project.id, "node_id": self.id, "node_directory": self.working_path}
# Qemu has a long list of options. The JSON schema is the single source of information
for field in Qemu.schema()["properties"]:
for field in Qemu.model_json_schema()["properties"]:
if field not in answer:
try:
answer[field] = getattr(self, field)