Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Remove individual foreign key requests for city view #538

Merged
merged 1 commit into from
Jul 11, 2017

Conversation

fungjj92
Copy link
Contributor

Overview

Thanks to the fancy new Django Toolbar, Reed discovered the city endpoint was creating a SQL request for the map cell associated to each city. This rolls it all into the 1 database query.

Notes

There were no other found instances when testing all other endpoints. Note the false positive in the issue.

Checklist

  • [n/a] Does the python linter pass?
  • [n/a] Do tests pass?
  • [n/a] Has the API documentation been updated, or does this PR not require it?

Closes #523

@fungjj92 fungjj92 requested a review from rmartz July 10, 2017 20:34
@fungjj92 fungjj92 changed the title Remove duplicating requests for city view Remove individual foreign key requests for city view Jul 10, 2017
Copy link
Contributor

@rmartz rmartz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fungjj92 fungjj92 merged commit 212f262 into develop Jul 11, 2017
@fungjj92 fungjj92 deleted the feature/jf/duplicate-requests-views branch August 9, 2017 17:56
ddohler pushed a commit that referenced this pull request Aug 21, 2023
Remove individual foreign key requests for city view
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefetch related fields in API view's querysets
3 participants