Skip to content

Commit

Permalink
fix: 'dict' object has not attribute error
Browse files Browse the repository at this point in the history
  • Loading branch information
devdiogenes committed Dec 3, 2024
1 parent d0c522e commit 35e5afc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erpnext/stock/get_item_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,8 @@ def is_within_valid_range(ctx: ItemDetailsCtx, tax) -> bool:
def get_item_tax_map(*, doc: str | dict | Document, tax_template: str | None = None, as_json=True):
doc = parse_json(doc)
item_tax_map = {}
for t in (t for t in (doc.get("taxes") or []) if not t.set_by_item_tax_template):
item_tax_map[t.account_head] = t.rate
for t in (t for t in (doc.get("taxes") or []) if not t.get("set_by_item_tax_template")):
item_tax_map[t.get("account_head")] = t.get("rate")

if tax_template:
template = frappe.get_cached_doc("Item Tax Template", tax_template)
Expand Down

0 comments on commit 35e5afc

Please sign in to comment.