Replies: 2 comments 12 replies
-
|
I think passing a None/Undefined where you expect a list is a bug, not something jinja should silently allow. Being empty is perfectly fine though. Typically an empty list returns another empty list after applying a filter on it.. |
Beta Was this translation helpful? Give feedback.
5 replies
-
|
Answers to your questions
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that a there are a few filters that work on lists/collections that do not check to see if the value being passed in a value and defined:
Example:
jinja/src/jinja2/filters.py
Line 460 in e20a52e
Any thoughts on adding a little defensive coding to these filters?
Reason behind the request is that when chaining filters together using | it can be difficult to validate if a list contains elements before passing it to the next filter.
Beta Was this translation helpful? Give feedback.
All reactions