From 8e2e531a6456da30afadbec6959e4eef45421faa Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Tue, 3 Oct 2023 14:29:25 -0500 Subject: [PATCH] fix: Update isSelfAsserted affiliation sorting method to validate on behalf of --- .../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 } }