fix(api): 修复添加产品时获取 barcode 有误的问题
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ching 2024-03-04 22:53:52 +08:00
parent f265d3144f
commit 742135ac67

2
app.py
View File

@ -200,7 +200,7 @@ def add():
if product: if product:
for product_barcode in product.product_barcodes: for product_barcode in product.product_barcodes:
if product_barcode.barcode == barcode: if product_barcode.barcode == barcode:
barcode_ = product_barcode.barcode barcode_ = product_barcode
break break
if barcode_: if barcode_:
amount = barcode_.amount amount = barcode_.amount