diff --git a/app/models/export_card_configuration.rb b/app/models/export_card_configuration.rb index ead1488e84..1a25b87410 100644 --- a/app/models/export_card_configuration.rb +++ b/app/models/export_card_configuration.rb @@ -40,6 +40,10 @@ class ExportCardConfiguration < ActiveRecord::Base "width", "indented"] def assert_required_keys(hash, valid_keys, required_keys) + if !hash.is_a?(Hash) + raise ArgumentError, I18n.t('validation_error_yaml_is_badly_formed') + end + begin hash.assert_valid_keys valid_keys rescue ArgumentError => e