From 116b7bf67216c33cfca6cc30cda8bdddb6267265 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 1 Jul 2026 19:18:17 +0530 Subject: [PATCH] fix: minor fix Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .../test_stock_and_account_value_comparison.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/report/stock_and_account_value_comparison/test_stock_and_account_value_comparison.py b/erpnext/stock/report/stock_and_account_value_comparison/test_stock_and_account_value_comparison.py index 2e6ee2afe58..7eabe37cc91 100644 --- a/erpnext/stock/report/stock_and_account_value_comparison/test_stock_and_account_value_comparison.py +++ b/erpnext/stock/report/stock_and_account_value_comparison/test_stock_and_account_value_comparison.py @@ -67,7 +67,8 @@ class TestStockAndAccountValueComparison(ERPNextTestSuite): rows = self.run_report(account=account) - row = next(r for r in rows if r["voucher_no"] == receipt.name) + row = next((r for r in rows if r["voucher_no"] == receipt.name), None) + self.assertIsNotNone(row, "Tampered GL entry should cause the voucher to appear in the report") self.assertEqual(row["ledger_type"], "Stock Ledger Entry") self.assertEqual(row["stock_value"], 1000) # unchanged stock ledger value self.assertEqual(row["account_value"], 600) # tampered GL value