Skip to content

Add select_related() to Report retrieval in dot_fec_composer compose_transactions function #1817

@exalate-issue-sync

Description

@exalate-issue-sync

In our dot_fec_composer compose_transactions function, we are retrieving a Report model here and later accessing an committee_account foreign key attribute here (since this is id, it may or may not be causing an additional query - might be worth double checking). This may be causing an additional query to join the foreign key table. This query may be avoided by adding select_related("committee_account") to the Report model retrieval.

This ticket is to add the call to select_related() call and verify that it prevents the additional query (perhaps using Silk).

QA Notes

null

DEV Notes

null

Design

null

See full ticket and images here: FECFILE-2737

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions