Skip to content

Commit

Permalink
Merge pull request #1463 from resilient-tech/mergify/bp/version-14/pr…
Browse files Browse the repository at this point in the history
…-1461

fix: KeyError in certain transactions resolved by using `get` method for dictionary access. (backport #1461)
  • Loading branch information
vorasmit authored Dec 23, 2023
2 parents bcd9ba3 + a7615a8 commit 5fb143d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def build_query_and_update_gst_details(gst_details, doctype):
# Update item conditions (WHEN)
for item_name, row in gst_details.items():
for field in conditions:
if not row[field]:
if not row.get(field):
continue

conditions[field] = conditions[field].when(
Expand Down

0 comments on commit 5fb143d

Please sign in to comment.