Skip to content

map filter: can't use a false, '', None, [], {} as default (or anything that is automatically cast to false) #1331

@tchernomax

Description

@tchernomax

if default and isinstance(item, Undefined):

So this will work:

{{ users|map(attribute="username", default="Anonymous")|join(", ") }}

but not this:

{{ users|map(attribute="username", default="")|join(", ") }}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions