mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
recipient lists for somerville data
This commit is contained in:
parent
1db61cd3e5
commit
fa02cee295
5 changed files with 10 additions and 11 deletions
|
|
@ -159,11 +159,6 @@ namespace :data do
|
|||
next
|
||||
end
|
||||
|
||||
recipient_list = school.recipient_lists.find_by_name("#{recipients.titleize} List")
|
||||
if recipient_list.nil?
|
||||
school.recipient_lists.create(name: "#{recipients.titleize} List")
|
||||
end
|
||||
|
||||
respondent_id = row['RespondentID']
|
||||
recipient_id = respondent_map[respondent_id]
|
||||
if recipient_id.present?
|
||||
|
|
@ -174,6 +169,11 @@ namespace :data do
|
|||
)
|
||||
respondent_map[respondent_id] = recipient.id
|
||||
end
|
||||
|
||||
recipient_list = school.recipient_lists.find_by_name("#{recipients.titleize} List")
|
||||
if recipient_list.nil?
|
||||
recipient_list = school.recipient_lists.create(name: "#{recipients.titleize} List")
|
||||
end
|
||||
recipient_list.recipient_id_array << recipient.id
|
||||
recipient_list.save!
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue