Skip to content

Commit

Permalink
fix: dict value for dimension for gl entries defined without the dime…
Browse files Browse the repository at this point in the history
…nsion

(cherry picked from commit ed3bef1)
  • Loading branch information
GursheenK authored and mergify[bot] committed Aug 18, 2023
1 parent 248d408 commit 11ba553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/accounts/general_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_accounting_dimensions_for_offsetting_entry(gl_map):
accounting_dimensions_to_offset = []
for acc_dimension in acc_dimensions:
fieldname = acc_dimension.lower().replace(" ", "_")
values = set([entry[fieldname] for entry in gl_map])
values = set([entry.get(fieldname) for entry in gl_map])
if len(values) > 1:
accounting_dimensions_to_offset.append(acc_dimension)
return accounting_dimensions_to_offset
Expand Down

0 comments on commit 11ba553

Please sign in to comment.