Skip to content

Export action loading list action associations #1954

@neutralino1

Description

@neutralino1

Hi all,

I'm reading through what happens when someone attempts to export a selection of records.
Just like in the list action, the get_collection method is called to retrieve the collection.
Now the first line of the method goes

associations = model_config.list.fields.select { |f| f.type == :belongs_to_association && !f.polymorphic? }.collect { |f| f.association.name }

in order to retrieve the associations to include in the query. Now this is all fine but notice how the list model configuration is used : model_config.list.
In the case of an export action, this should be accessing the export settings.

In effet, I do see in the logs association being queried for that were configured in the list action but not in the export action.

Is this a feature or a bug?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions