From 88b84893e3da2b2ca3d73b23de8c9f22ffbf2ce8 Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Tue, 3 Oct 2023 15:24:16 -0500 Subject: [PATCH] fix: Update isSelfAsserted affiliation sorting method to validate on behalf of (#2066) Co-authored-by: Angel Montenegro --- .../record-affiliations-sort.service.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/core/record-affiliations-sort/record-affiliations-sort.service.ts b/src/app/core/record-affiliations-sort/record-affiliations-sort.service.ts index 4a29955643..b2ba5a0eb6 100644 --- a/src/app/core/record-affiliations-sort/record-affiliations-sort.service.ts +++ b/src/app/core/record-affiliations-sort/record-affiliations-sort.service.ts @@ -206,10 +206,8 @@ export class AffiliationsSortService { }) } - private static isSelfAsserted( - affiliationGroup: AffiliationGroup, - orcid: string - ): boolean { - return affiliationGroup.defaultAffiliation.source === orcid + private static isSelfAsserted(affiliationGroup: AffiliationGroup, orcid: string): boolean { + const obo = !!(affiliationGroup.defaultAffiliation.assertionOriginName || affiliationGroup.defaultAffiliation.assertionOriginOrcid) + return obo ? obo : affiliationGroup.defaultAffiliation.source === orcid } }