mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 15:08:15 -07:00
fix: support alternate format for active admin data items. Support both 'True/False' and '1/0'
This commit is contained in:
parent
db90ce2ac1
commit
b6de3349d6
1 changed files with 3 additions and 2 deletions
|
|
@ -98,13 +98,14 @@ class Seeder
|
|||
survey_item.update! prompt: row["Question/item (22-23)"].strip
|
||||
end
|
||||
|
||||
if row["Source"] == "Admin Data" && row["Active admin & survey items"] == "TRUE"
|
||||
active_admin = row["Active admin & survey items"]
|
||||
if row["Source"] == "Admin Data" && %w[TRUE 1].include?(active_admin)
|
||||
admin_data_item = AdminDataItem.where(admin_data_item_id: data_item_id, scale:).first_or_create
|
||||
admin_data_item.watch_low_benchmark = watch_low if watch_low
|
||||
admin_data_item.growth_low_benchmark = growth_low if growth_low
|
||||
admin_data_item.approval_low_benchmark = approval_low if approval_low
|
||||
admin_data_item.ideal_low_benchmark = ideal_low if ideal_low
|
||||
admin_data_item.description = row["Question/item (22-23)"].strip
|
||||
admin_data_item.description = row["Question/item (22-23)"]&.strip
|
||||
admin_data_item.hs_only_item = marked? row["HS only admin item?"]
|
||||
admin_data_item.save!
|
||||
admin_data_item_ids << admin_data_item.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue