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
  • Loading branch information
GursheenK committed Jul 17, 2023
1 parent 4004427 commit ed3bef1
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 @@ -93,7 +93,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 ed3bef1

Please sign in to comment.