mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
feat: Add language filter for parent analysis
This commit is contained in:
parent
8e5e2a030a
commit
1845d1ac7b
1 changed files with 3 additions and 2 deletions
|
|
@ -110,10 +110,11 @@ class SurveyResponsesDataLoader
|
|||
end
|
||||
|
||||
if row.respondent_type == :parent
|
||||
unknown_housing = Housing.find_by(designation: row.housing).id
|
||||
parent = Parent.find_or_create_by(response_id: row.response_id, housing_id: unknown_housing)
|
||||
parent = Parent.find_or_create_by(response_id: row.response_id)
|
||||
parent.number_of_children = row.number_of_children
|
||||
tmp_languages = row.languages.map { |language| languages[language] }
|
||||
parent.housing_id = Housing.find_by(designation: row.housing).id
|
||||
parent.languages.delete_all
|
||||
parent.languages.concat(tmp_languages)
|
||||
parent.housing = Housing.find_by(designation: row.housing)
|
||||
parent.save
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue