fix: don't fetch item_code if already exists. (#31113)

fix: check if item_code exists before fetching
This commit is contained in:
Devin Slauenwhite 2022-05-25 00:05:22 -04:00 committed by GitHub
parent 1ecb8f4a67
commit 55276f11f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,7 +199,7 @@ def process_args(args):
if not args.get("price_list"):
args.price_list = args.get("selling_price_list") or args.get("buying_price_list")
if args.barcode:
if not args.item_code and args.barcode:
args.item_code = get_item_code(barcode=args.barcode)
elif not args.item_code and args.serial_no:
args.item_code = get_item_code(serial_no=args.serial_no)