Skip to content

Commit

Permalink
fix: builtins.KeyError: ('ABC', 'Store - CP') (#42505)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Jul 29, 2024
1 parent cb522f8 commit 25dac1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion erpnext/stock/stock_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ def repost_future_sle(
)
affected_transactions.update(obj.affected_transactions)

distinct_item_warehouses[(args[i].get("item_code"), args[i].get("warehouse"))].reposting_status = True
key = (args[i].get("item_code"), args[i].get("warehouse"))
if distinct_item_warehouses.get(key):
distinct_item_warehouses[key].reposting_status = True

if obj.new_items_found:
for _item_wh, data in distinct_item_warehouses.items():
Expand Down

0 comments on commit 25dac1f

Please sign in to comment.