diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 4eeae5a9..4b6f7d71 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -489,14 +489,14 @@ export class ParsingFunctions { // researchResult.relationName = relation.to.class; - if (relation['resulttype']) { - if (relation['resulttype'] == "publication") { + if (relation['header'] && relation.header.recordType) { + if (relation.header.recordType == "publication") { researchResult['class'] = "publication"; - } else if (relation['resulttype'] == "dataset") { + } else if (relation.header.recordType == "dataset") { researchResult['class'] = "dataset"; - } else if (relation['resulttype'] == "software") { + } else if (relation.header.recordType == "software") { researchResult['class'] = "software"; - } else if (relation['resulttype'] == "other") { + } else if (relation.header.recordType == "other") { researchResult['class'] = "other"; } } diff --git a/landingPages/result/deletedByInference/deletedByInference.component.ts b/landingPages/result/deletedByInference/deletedByInference.component.ts index 96208f35..46802f37 100644 --- a/landingPages/result/deletedByInference/deletedByInference.component.ts +++ b/landingPages/result/deletedByInference/deletedByInference.component.ts @@ -110,7 +110,11 @@ export class DeletedByInferenceComponent { if(result.hasOwnProperty("description")) { preview.description = result.description; } - preview.resultType = result?.resulttype ? result.resulttype : this.resultType; + + if(result.header) { + // preview.resultType = result?.resulttype ? result.resulttype : this.resultType; + preview.resultType = result.header?.recordType ? result.result.header.recordType : this.resultType; + } if (result.hasOwnProperty("instances")) { preview.hostedBy_collectedFrom = new Array();