fixing bugs with school_question creation

This commit is contained in:
Jared Cosulich 2018-12-21 13:50:24 -05:00
parent c7892bcb86
commit 5dc79e5da7
2 changed files with 4 additions and 2 deletions

View file

@ -461,6 +461,7 @@ namespace :data do
next if school.district.name != "Boston"
attempt_data = Attempt.
joins(:question).
created_in(school_category.year).
for_question(question).
for_school(school).
@ -469,7 +470,7 @@ namespace :data do
available_responders = school.available_responders_for(question)
school_question = school_category.school_questions.for(school, question)
school_question = school_category.school_questions.for(school, question).first
if school_question.present?
school_questions << school_question
else