From 6c935061a9ab5a8c3a7bb54a06855042c6f4eaa6 Mon Sep 17 00:00:00 2001 From: "j.gohier" Date: Thu, 10 Oct 2024 15:02:50 +0200 Subject: [PATCH] rendu optional cdron sur schema pydantic --- api/vm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/vm.py b/api/vm.py index 0e9087d..2f17828 100644 --- a/api/vm.py +++ b/api/vm.py @@ -90,7 +90,7 @@ class DevicesInterface(BaseModel): switch_id:UUID4 id:UUID4 = Field(default_factory=uuid4) - mac_addr:str = Field(default=None) + mac_addr:str = Field(default='') class Graphics(BaseModel): port:int = Field(default=-1) @@ -121,7 +121,7 @@ class TPM(BaseModel): class Devices(BaseModel): disks:Optional[List[DevicesDisk]] = Field(default=None, description="Disques virtuel") - cdrom:DevicesCDROM = Field(default=None, description="CDROM virtuel") + cdrom:Optional[DevicesCDROM] = Field(default=None, description="CDROM virtuel") interfaces:Optional[List[DevicesInterface]] = Field(default=None, description="Interfaces réseau") graphics:Optional[Graphics] = Field(default=None, description="Console VNC") audio:Audio = Field(default=None, description="Carte Audio")