diff --git a/frappe/utils/safe_exec.py b/frappe/utils/safe_exec.py index 29bded6fc8..6c1fa21685 100644 --- a/frappe/utils/safe_exec.py +++ b/frappe/utils/safe_exec.py @@ -12,6 +12,7 @@ from frappe.modules import scrub from frappe.www.printview import get_visible_columns import frappe.exceptions import frappe.integrations.utils +from frappe.frappeclient import FrappeClient class ServerScriptNotEnabled(frappe.PermissionError): pass @@ -104,8 +105,10 @@ def get_safe_globals(): make_post_request = frappe.integrations.utils.make_post_request, socketio_port=frappe.conf.socketio_port, get_hooks=frappe.get_hooks, - sanitize_html=frappe.utils.sanitize_html + sanitize_html=frappe.utils.sanitize_html, + log_error=frappe.log_error ), + FrappeClient=FrappeClient, style=frappe._dict( border_color='#d1d8dd' ), @@ -297,4 +300,4 @@ VALID_UTILS = ( "formatdate", "get_user_info_for_avatar", "get_abbr" -) \ No newline at end of file +)