Skip to content

Ability to set default value in groupby filter #1359

@lisongmin

Description

@lisongmin

Hi,

I suggest adding the default parameter to groupby filter, so we can group the list
with some objects missing the group attribute.

when we config ansible inventory, we usually do not write the options that have a default value.
it is good if groupby has the default value for this scenario.

Since make_attrgetter already support the default parameter, it is easy to implitment.

thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions