Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: builtins.KeyError: ('ABC', 'Store - CP') (backport #42505) #42509

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading