Merge pull request #41512 from frappe/mergify/bp/version-14-hotfix/pr-41511

fix: possible sql error on General Ledger (backport #41511)
This commit is contained in:
ruthra kumar
2024-05-17 11:17:24 +05:30
committed by GitHub

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):