fix: use list() on self mutating iteration

https://github.com/frappe/erpnext/issues/30325

Signed-off-by: Sabu Siyad <hello@ssiyad.com>
(cherry picked from commit 546c809cbe)
This commit is contained in:
Sabu Siyad
2022-11-17 17:46:49 +05:30
committed by Mergify
parent 00558af873
commit eb968d7f02
2 changed files with 2 additions and 2 deletions

View File

@@ -394,7 +394,7 @@ def get_opening_balance(filters, columns, sl_entries):
)
# check if any SLEs are actually Opening Stock Reconciliation
for sle in sl_entries:
for sle in list(sl_entries):
if (
sle.get("voucher_type") == "Stock Reconciliation"
and sle.posting_date == filters.from_date