mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-28 14:18:24 +00:00
refactor(stock): use db.count for the empty ledger check (#58486)
Align the existence check in `reset_bin_without_stock_ledger_entries()` with
the version-15-hotfix backport in #58434, per review feedback there.
(cherry picked from commit 2866be2816)
This commit is contained in:
committed by
Mergify
parent
f7f34ffd3b
commit
38aaceafc6
@@ -1798,7 +1798,7 @@ class update_entries_after:
|
||||
if not item_code or not warehouse or (item_code, warehouse) in self.prev_sle_dict:
|
||||
return
|
||||
|
||||
if frappe.db.exists(
|
||||
if frappe.db.count(
|
||||
"Stock Ledger Entry", {"item_code": item_code, "warehouse": warehouse, "is_cancelled": 0}
|
||||
):
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user