fix: possible sql error on General Ledger

(cherry picked from commit 76131f8e10)
This commit is contained in:
ruthra kumar
2024-05-17 10:37:07 +05:30
committed by Mergify
parent 0cbf049608
commit dfb4c47089

View File

@@ -211,7 +211,8 @@ def get_conditions(filters):
if filters.get("account"):
filters.account = get_accounts_with_children(filters.account)
conditions.append("account in %(account)s")
if filters.account:
conditions.append("account in %(account)s")
if filters.get("cost_center"):
filters.cost_center = get_cost_centers_with_children(filters.cost_center)
@@ -316,7 +317,7 @@ def get_accounts_with_children(accounts):
else:
frappe.throw(_("Account: {0} does not exist").format(d))
return list(set(all_accounts))
return list(set(all_accounts)) if all_accounts else None
def get_data_with_opening_closing(filters, account_details, accounting_dimensions, gl_entries):