lib/bolognese/datacite_utils.rb in bolognese-0.9.10 vs lib/bolognese/datacite_utils.rb in bolognese-0.9.11
- old
+ new
@@ -162,12 +162,11 @@
xml.version(version)
end
def rel_identifier
Array.wrap(related_identifier).map do |r|
- related_identifier_type = r["issn"].present? ? "ISSN" : validate_url(r["id"])
- { "__content__" => r["id"],
- "related_identifier_type" => related_identifier_type,
+ { "__content__" => r["id"] || r["issn"],
+ "related_identifier_type" => r["issn"].present? ? "ISSN" : validate_url(r["id"]),
"relation_type" => r["relationType"],
"resource_type_general" => r["resourceTypeGeneral"] }.compact
end
end