From 679d7dd0cf15afd7c641505e84b64e9d1621378d Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sat, 31 Jul 2021 20:37:52 +0530 Subject: [PATCH] perf: don't try to match SLE if count mismatch --- erpnext/accounts/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 9272bc4fcee..f3a70fa4d5e 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -960,6 +960,9 @@ def get_voucherwise_gl_entries(future_stock_vouchers, posting_date): return gl_entries def compare_existing_and_expected_gle(existing_gle, expected_gle, precision): + if len(existing_gle) != len(expected_gle): + return False + matched = True for entry in expected_gle: account_existed = False