From 785eff869d0a07ccf113da2013d0ed9f64914f07 Mon Sep 17 00:00:00 2001
From: grossmj <grossmj@gns3.net>
Date: Mon, 3 Jul 2023 18:55:19 +1000
Subject: [PATCH] Fix issue with appliance API returning unset data

---
 gns3server/api/routes/controller/appliances.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gns3server/api/routes/controller/appliances.py b/gns3server/api/routes/controller/appliances.py
index 82cc4cc6..3b1c2a30 100644
--- a/gns3server/api/routes/controller/appliances.py
+++ b/gns3server/api/routes/controller/appliances.py
@@ -44,7 +44,7 @@ log = logging.getLogger(__name__)
 router = APIRouter()
 
 
-@router.get("")
+@router.get("", response_model=List[schemas.Appliance], response_model_exclude_unset=True)
 async def get_appliances(
         update: Optional[bool] = False,
         symbol_theme: Optional[str] = None
@@ -60,7 +60,7 @@ async def get_appliances(
     return [c.asdict() for c in controller.appliance_manager.appliances.values()]
 
 
-@router.get("/{appliance_id}")
+@router.get("/{appliance_id}", response_model=schemas.Appliance, response_model_exclude_unset=True)
 def get_appliance(appliance_id: UUID) -> schemas.Appliance:
     """
     Get an appliance file.