Fix issue with appliance API returning unset data

This commit is contained in:
grossmj 2023-07-03 18:55:19 +10:00
parent 24db2a039d
commit 785eff869d

View File

@ -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.