Skip to content

Conversation

@xsrust
Copy link
Contributor

@xsrust xsrust commented Jan 30, 2018

updated load_for_phase function and num_answered_questions on the plans model

num_answered_questions needed changed to go via the plan.template.phases.sections.questions, instead of plan.sections.questions

Prefetch updated on load_for_phase to run in one query thanks to a .joins() along with an includes.
This pattern seems to force all includes statements to run within the initial query and is a pattern we can re-use in future

Appologies for the noise in the diffs, my editor rips trailing whitespace

@briri
Copy link
Contributor

briri commented Jan 30, 2018

Looks fine to me Sam. Just need to fix the broken test. Feel free to merge yourself once its passing

@jollopre jollopre merged commit 2c2c93c into DMPRoadmap:master Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants