Merge pull request #12099 from pratu16x7/user-progress-items-fix

Create item price only if item created
This commit is contained in:
Prateeksha Singh 2017-12-19 12:54:58 +05:30 committed by GitHub
commit 41d2feab35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,6 +113,9 @@ def create_items(args_data):
"default_warehouse": default_warehouse
}).insert()
except frappe.NameError:
pass
else:
if args.get("item_price_" + str(i)):
item_price = flt(args.get("item_price_" + str(i)))
@ -121,8 +124,6 @@ def create_items(args_data):
price_list_name = frappe.db.get_value("Price List", {"buying": 1})
make_item_price(item, price_list_name, item_price)
except frappe.NameError:
pass
def make_item_price(item, price_list_name, item_price):
frappe.get_doc({