Extracted the correct original type to pass to instanceTypeMapping in Crossref Mapping

This commit is contained in:
Sandro La Bruzzo 2023-12-01 16:33:56 +01:00
parent 511a98dd80
commit 3caf6ff27e
1 changed files with 3 additions and 1 deletions

View File

@ -372,7 +372,9 @@ case object Crossref2Oaf {
objectType,
mappingCrossrefSubType.getOrElse(objectSubType, "0038 Other literature type")
)
mappingResult(result, json, cOBJCategory, objectSubType)
val originalType = if (mappingCrossrefSubType.contains(objectType)) objectType else objectSubType
mappingResult(result, json, cOBJCategory, originalType)
if (result == null || result.getId == null)
return List()