Merge pull request #15362 from gavindsouza/agg-patch-fix-0

fix: Escape matching pattern for substitution
This commit is contained in:
gavin 2021-12-20 14:13:12 +05:30 committed by GitHub
commit 34d343bc06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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