some API fixes

This commit is contained in:
Laura Klünder 2023-11-30 22:45:36 +01:00
parent 62e97b0b2f
commit 7401c00216
2 changed files with 13 additions and 14 deletions

View file

@ -45,6 +45,10 @@ class FirmwareBuildSchema(Schema):
example={BoardType.C3NAV_LOCATION_PCB_REV_0_2.name, }
)
@staticmethod
def resolve_boards(obj):
return list(obj.boards)
class Config(Schema.Config):
pass
@ -123,10 +127,6 @@ class UploadFirmwareBuildSchema(Schema):
project_description: dict = APIField(..., title='project_description.json contents')
uploaded_filename: str = APIField(..., example="firmware.bin")
@staticmethod
def resolve_boards(obj):
return list(obj.boards)
class UploadFirmwareSchema(Schema):
"""