diff --git a/barker/barker/routers/voucher/show.py b/barker/barker/routers/voucher/show.py index 23938448..601eefe2 100644 --- a/barker/barker/routers/voucher/show.py +++ b/barker/barker/routers/voucher/show.py @@ -301,7 +301,7 @@ def voucher_blank(table: FoodTable, guest: GuestBook | None) -> VoucherBlank: return VoucherBlank( pax=table.seats if guest is None else guest.pax, table=TableLink(id_=table.id, name=table.name), - voucher_type=str(VoucherType.KOT), + voucher_type=VoucherType.KOT, customer=CustomerLink(id_=guest.customer_id, name=guest.customer.name) if guest is not None else None, kots=[], ) diff --git a/barker/barker/schemas/voucher_out.py b/barker/barker/schemas/voucher_out.py index b1cf3686..38e80cf0 100644 --- a/barker/barker/schemas/voucher_out.py +++ b/barker/barker/schemas/voucher_out.py @@ -109,7 +109,7 @@ class VoucherBlank(BaseModel): pax: int table: TableLink customer: CustomerLink | None = None - voucher_type: str + voucher_type: int kots: list[Kot] model_config = ConfigDict(str_strip_whitespace=True, alias_generator=to_camel, populate_by_name=True)