don't fail if aggregated responses are missing

pull/1/head
Jared Cosulich 7 years ago
parent 7fb5bfd242
commit 1cda8fd294

@ -1,5 +1,5 @@
- aggregated_responses = question.aggregated_responses_for_school(@school)
-# return if aggregated_responses.nil?
- return if aggregated_responses.nil?
- school_question = SchoolQuestion.for(@school, question).first
- valid_responses = school_question.nil? ? true : school_question.response_rate > 0.3 # || (aggregated_responses.count.to_f / @school.available_responders_for(question).to_f)) >= 0.3

Loading…
Cancel
Save