Open vladimir-vvalov opened 1 month ago
I should note this appears to happen on filters that are specially geared towards strings. I'm not sure what you'd otherwise expect to happen when you ask to trim None
but I'm confident multiple people would have differing opinions.
When argument value is
None
filters convert it to string'None'
then process it as string'None'
. But if this behaviour was correct, the expression{{ if none == 'None' }}
should returnTrue
. But returnsFalse
. Also I didn't find any information about this behaviour in documentation: https://jinja.palletsprojects.com/en/3.1.x/templates/code:
compiled code:
expected behavior: It was expected that if the argument is
None
, then the filter liketrim()
will also returnNone
.Thank you.
Environment: