fix(minor): fixed execute_query patch
This commit is contained in:
parent
fe7b45c068
commit
5362d367d1
1 changed files with 1 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ def patch_query_execute():
|
|||
"""
|
||||
|
||||
def execute_query(query, *args, **kwargs):
|
||||
query = str(query)
|
||||
if frappe.flags.in_safe_exec and not query.lower().strip().startswith("select"):
|
||||
raise frappe.PermissionError('Only SELECT SQL allowed in scripting')
|
||||
return frappe.db.sql(query, *args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue