fix(query): don't create 2 error logs for the same thing (#34925)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-11-28 12:39:31 +05:30 committed by GitHub
parent a7d8495d7b
commit 9e380bc33c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -350,8 +350,7 @@ class Engine:
self.query = self.query.where(combined_criterion)
except Exception as e:
# Log the original filters list for better debugging context
frappe.log_error(f"Filter parsing error: {filters}", "Query Engine Error")
frappe.throw(_("Error parsing nested filters: {0}").format(e), exc=e)
frappe.throw(_("Error parsing nested filters: {0}. {1}").format(filters, e), exc=e)
else: # Not a nested structure, assume it's a list of simple filters (implicitly ANDed)
for filter_item in filters: