diff --git a/frappe/patches/v14_0/remove_db_aggregation.py b/frappe/patches/v14_0/remove_db_aggregation.py index 25a170f362..a8fa5b2ba1 100644 --- a/frappe/patches/v14_0/remove_db_aggregation.py +++ b/frappe/patches/v14_0/remove_db_aggregation.py @@ -27,6 +27,6 @@ def execute(): name, script = server_script["name"], server_script["script"] for agg in ["avg", "max", "min", "sum"]: - script = re.sub(f"frappe.db.{agg}(", f"frappe.qb.{agg}(", script) + script = re.sub(f"frappe.db.{agg}\(", f"frappe.qb.{agg}(", script) frappe.db.update("Server Script", name, "script", script)