Skip to content

Commit

Permalink
fix: KeyError in certain transactions resolved by using get method …
Browse files Browse the repository at this point in the history
…for dictionary access.

(cherry picked from commit e734fa8)
  • Loading branch information
finbyz authored and mergify[bot] committed Dec 23, 2023
1 parent bcd9ba3 commit a7615a8
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 a7615a8

Please sign in to comment.