lib/bright/sis_apis/power_school.rb in bright-1.2.2 vs lib/bright/sis_apis/power_school.rb in bright-1.2.3
- old
+ new
@@ -245,10 +245,13 @@
#this should be an array, but it doesn't appear PS always sends it as one
cattrs[:race] = [race_hshs].flatten.map{|race_hsh| race_hsh["district_race_code"]}.compact.uniq
end
if !attrs.dig("ethnicity_race", "federal_ethnicity").nil?
- cattrs[:hispanic_ethnicity] = attrs.dig("ethnicity_race", "federal_ethnicity").to_bool
+ begin
+ cattrs[:hispanic_ethnicity] = attrs.dig("ethnicity_race", "federal_ethnicity").to_bool
+ rescue
+ end
end
end
#Contacts Info
[1,2].each do |contact_id|