lib/eco/api/common/people/default_parsers.rb in eco-helpers-1.0.8 vs lib/eco/api/common/people/default_parsers.rb in eco-helpers-1.0.9
- old
+ new
@@ -13,9 +13,10 @@
def define_defaults
# Select Options
select_hashes = @schema.fields.map do |fld|
if fld.type == "select"
+ raise "The schema selection field '#{fld.name}' is missing selection options." unless fld.options && !fld.options.empty?
options_hash = fld.options.map { |v| [v.downcase.strip, v] }.to_h
[fld.alt_id, options_hash]
end
end.compact.to_h