Skip to content

Commit

Permalink
refactor: use frappe._dict() instead of {} (#44255)
Browse files Browse the repository at this point in the history
* refactor: use `frappe._dict()` instead of `{}`

A downstream function (`_get_item_tax_template`) expects this to be a frappe._dict and fails otherwise.

* refactor: use `ItemDetails()`
  • Loading branch information
barredterra authored Nov 20, 2024
1 parent 8d8070e commit 4b53075
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 @@ -550,7 +550,7 @@ def get_item_tax_info(company, tax_category, item_codes, item_rates=None, item_t
if not item_code or item_code[1] in out or not item_tax_templates.get(item_code[1]):
continue

out[item_code[1]] = {}
out[item_code[1]] = ItemDetails()
item = frappe.get_cached_doc("Item", item_code[0])
ctx: ItemDetailsCtx = {
"company": company,
Expand Down

0 comments on commit 4b53075

Please sign in to comment.