Skip to content

Commit

Permalink
fix: check if item_code exists before fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
dj12djdjs committed May 24, 2022
1 parent 1ecb8f4 commit 4f8172c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/stock/get_item_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4f8172c

Please sign in to comment.