Skip to content

Commit

Permalink
Merge branch 'master' into feature_queries_forstats
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed Jan 8, 2019
2 parents c8af853 + 8a8683e commit 32a6a8b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/xml_schema_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ def validate_each(record, attribute, value)
end

kernel = get_valid_kernel(record.schema_version)
unless kernel.present?
record.errors[:xml] << "schema should be present"
return false
end
return false unless kernel.present?

filepath = Bundler.rubygems.find_name('bolognese').first.full_gem_path + "/resources/#{kernel}/metadata.xsd"
schema = Nokogiri::XML::Schema(open(filepath))
Expand Down

0 comments on commit 32a6a8b

Please sign in to comment.