lib/bright/sis_apis/power_school.rb in bright-1.2.3 vs lib/bright/sis_apis/power_school.rb in bright-1.3
- old
+ new
@@ -225,11 +225,12 @@
rescue => e
puts "#{e.inspect} #{bd}"
end
end
- cattrs[:gender] = attrs["demographics"]["gender"]
+ # To avoid a mismatch of attributes, we'll ignore for now
+ # cattrs[:gender] = attrs["demographics"]["gender"]
pg = attrs["demographics"]["projected_graduation_year"].to_i
cattrs[:projected_graduation_year] = pg if pg > 0
end
@@ -287,10 +288,11 @@
:first_name => student.first_name,
:middle_name => student.middle_name,
:last_name => student.last_name
}.reject{|k,v| v.respond_to?(:empty?) ? v.empty? : v.nil?},
:demographics => {
- :gender => student.gender.to_s[0].to_s.upcase,
+ # To avoid a mismatch of attributes, we'll ignore for now
+ # :gender => student.gender.to_s[0].to_s.upcase,
:birth_date => (student.birth_date ? student.birth_date.strftime(DATE_FORMAT) : nil),
:projected_graduation_year => student.projected_graduation_year
}.reject{|k,v| v.respond_to?(:empty?) ? v.empty? : v.nil?}
}.merge(additional_params).reject{|k,v| v.respond_to?(:empty?) ? v.empty? : v.nil?}