In case of a table with no guest, it will ask for pax
This commit is contained in:
@ -36,12 +36,6 @@ def save(request):
|
||||
voucher_type = VoucherType[request.GET["p"]]
|
||||
guest_book = get_guest_book(request.GET.get("g", None), request.dbsession)
|
||||
|
||||
table = (
|
||||
request.dbsession.query(FoodTable)
|
||||
.filter(FoodTable.id == uuid.UUID(json["table"]["id"]))
|
||||
.first()
|
||||
)
|
||||
|
||||
check_permissions(None, voucher_type, request.effective_principals)
|
||||
|
||||
bill_id = get_bill_id(voucher_type, request.dbsession)
|
||||
@ -51,7 +45,7 @@ def save(request):
|
||||
|
||||
item = Voucher(
|
||||
now,
|
||||
guest_book.pax if guest_book is not None else table.seats,
|
||||
guest_book.pax if guest_book is not None else json["pax"],
|
||||
bill_id,
|
||||
kot_id,
|
||||
json["table"]["id"],
|
||||
|
||||
Reference in New Issue
Block a user