Minor fixes in fetching item details
diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py
index 4a295d8..9c251b8 100644
--- a/erpnext/stock/get_item_details.py
+++ b/erpnext/stock/get_item_details.py
@@ -255,6 +255,7 @@
 
 	args = frappe._dict(args)
 	out = frappe._dict()
+	if not args.get("item_code"): return
 
 	if not args.get("item_group") or not args.get("brand"):
 		args.item_group, args.brand = frappe.db.get_value("Item",