lib/bolognese/readers/datacite_reader.rb in bolognese-1.0.5 vs lib/bolognese/readers/datacite_reader.rb in bolognese-1.0.6
- old
+ new
@@ -115,11 +115,11 @@
"date" => parse_attributes(d),
"date_type" => parse_attributes(d, content: "dateType")
}
end
dates << { "date" => meta.fetch("publicationYear", nil), "date_type" => "Issued" } if meta.fetch("publicationYear", nil).present? && get_date(dates, "Issued").blank?
- sizes = Array.wrap(meta.dig("sizes", "size")).unwrap
- formats = Array.wrap(meta.dig("formats", "format")).unwrap
+ sizes = Array.wrap(meta.dig("sizes", "size"))
+ formats = Array.wrap(meta.dig("formats", "format"))
funding_references = Array.wrap(meta.dig("fundingReferences", "fundingReference")).compact.map do |fr|
{
"funder_name" => fr["funderName"],
"funder_identifier" => normalize_id(parse_attributes(fr["funderIdentifier"])),
"funder_identifier_type" => parse_attributes(fr["funderIdentifier"], content: "funderIdentifierType"),