Skip to content

Commit

Permalink
catch a ValueError in order to load custom templates (#6383)
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide-sd authored Feb 24, 2024
1 parent 39379c8 commit 3e736f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panel/template/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def __init__(self, **params):
tmpl_string = self._template.read_text(encoding='utf-8')
try:
template = _env.get_template(str(self._template.relative_to(Path(__file__).parent)))
except jinja2.exceptions.TemplateNotFound:
except (jinja2.exceptions.TemplateNotFound, ValueError):
template = parse_template(tmpl_string)

if 'header' not in params:
Expand Down

0 comments on commit 3e736f4

Please sign in to comment.