From baefaeb22803750cfe02ad7ff1f5a75270f65428 Mon Sep 17 00:00:00 2001 From: tanshu Date: Mon, 9 Aug 2021 23:07:04 +0530 Subject: [PATCH] Fix: Show would repeat the string n times instead of multiplying the integer --- barker/barker/routers/voucher/show.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barker/barker/routers/voucher/show.py b/barker/barker/routers/voucher/show.py index 1871c98..ca8b8c4 100644 --- a/barker/barker/routers/voucher/show.py +++ b/barker/barker/routers/voucher/show.py @@ -42,7 +42,7 @@ def from_bill( query = select(Voucher) if re.compile(r"^\d{1,3}-\d{1,4}$").match(id_): s, n = id_.split("-") - i = int(s * 10000) + int(n) + i = (int(s) * 10000) + int(n) query = query.where(Voucher.bill_id == i, Voucher.voucher_type == VoucherType.REGULAR_BILL) elif re.compile(r"^K-\d+$").match(id_): query = query.where(