Skip to content

Add select_related() to Report retrieval in submit_to_fec viewset action #1815

@exalate-issue-sync

Description

@exalate-issue-sync

In our web_services submit_to_fec view action, we are retrieving a Report model here and later accessing an upload_submission foreign key attribute here. This may be causing an additional query to join the foreign key table. This query may be avoided by adding select_related("upload_submission") 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-2735

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions