From cc6ff2994f2bcd5b63bcae9c22cd7882e36f0dda Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:13:09 +0100 Subject: [PATCH] fix: make render_include work without `local` object frappe.throw relies on local, making it impossible to use this function without an active site. --- frappe/model/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/utils/__init__.py b/frappe/model/utils/__init__.py index 153a42ec12..d0015101b1 100644 --- a/frappe/model/utils/__init__.py +++ b/frappe/model/utils/__init__.py @@ -66,7 +66,7 @@ def render_include(content): if "{% include" in content: paths = INCLUDE_DIRECTIVE_PATTERN.findall(content) if not paths: - frappe.throw(_("Invalid include path"), InvalidIncludePath) + raise InvalidIncludePath for path in paths: app, app_path = path.split("/", 1)