You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
default filter requires an explicit argument and fails without one #1339
The default filter declares default_value as a required parameter, so a template that uses the filter without an argument fails to render. Jinja2 makes the argument optional and supplies an empty string.
Affected: master df50b0d7. Releases 2.7.6, 2.8.3 and 2.8.4 carry the same declaration.
Reproduction
{{ 'a'|default }}
Jinja2 renders a. Jinjava raises:
com.hubspot.jinjava.interpret.FatalTemplateErrorsException: Argument named 'default_value' is required but missing for filter default
Root cause
DefaultFilter registers default_value with required = true. AbstractFilter.validateArgs rejects the call before the filter body runs, so no path returns the input unchanged when the argument is omitted.
Activity