fix: make render_include work without local object

frappe.throw relies on local, making it impossible to use this function without an active site.
This commit is contained in:
barredterra 2024-01-19 16:13:09 +01:00
parent 1640aaad04
commit cc6ff2994f

View file

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