mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-11 16:30:35 -07:00
fixing bugs with school_question creation
This commit is contained in:
parent
c7892bcb86
commit
5dc79e5da7
2 changed files with 4 additions and 2 deletions
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20181218154720) do
|
||||
ActiveRecord::Schema.define(version: 20181221180917) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -168,6 +168,7 @@ ActiveRecord::Schema.define(version: 20181218154720) do
|
|||
t.string "year"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "response_total"
|
||||
end
|
||||
|
||||
create_table "schools", force: :cascade do |t|
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue