mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
feat: stop processing race or gender column if we encounter values we don't know about
This commit is contained in:
parent
cd6b503f44
commit
e8bc5eb11a
2 changed files with 15 additions and 3 deletions
|
|
@ -23,7 +23,13 @@ class Gender < ApplicationRecord
|
|||
when %r{^#*N/*A$}i
|
||||
99
|
||||
else
|
||||
99
|
||||
puts "************************************"
|
||||
puts "******** ERROR **********"
|
||||
puts ""
|
||||
puts "Error parsing Gender column. '#{word}' is not a known value. Halting execution"
|
||||
puts ""
|
||||
puts "************************************"
|
||||
exit
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class Race < ApplicationRecord
|
|||
3
|
||||
when /Hispanic|Latinx|4/i
|
||||
4
|
||||
when /White|Caucasian|5/i
|
||||
when /White|Caucasian|Caucasion|5/i
|
||||
5
|
||||
when /Prefer not to disclose|6/i
|
||||
6
|
||||
|
|
@ -31,7 +31,13 @@ class Race < ApplicationRecord
|
|||
when %r{^#*N/*A$}i
|
||||
nil
|
||||
else
|
||||
99
|
||||
puts "************************************"
|
||||
puts "******** ERROR **********"
|
||||
puts ""
|
||||
puts "Error parsing race column. '#{word}' is not a known value. Halting execution"
|
||||
puts ""
|
||||
puts "************************************"
|
||||
exit
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue