Skip to content

Commit

Permalink
orgUnit name handling: fallback to dc.title if organisation.legalName…
Browse files Browse the repository at this point in the history
… does not exist
  • Loading branch information
saschaszott authored Jun 23, 2023
1 parent d9c4412 commit 17678c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/core/breadcrumbs/dso-name.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ export class DSONameService {
}
return `${familyName}, ${givenName}`;
} else if (entityType === 'OrgUnit') {
return this.firstMetadataValue(object, dso, 'organization.legalName');
const orgUnitName = this.firstMetadataValue(object, dso, 'organization.legalName');
if (isEmpty(orgUnitName)) {
return this.firstMetadataValue(object, dso, 'dc.title') || dso.name;
}
return orgUnitName;
}
return this.firstMetadataValue(object, dso, 'dc.title') || dso.name || this.translateService.instant('dso.name.untitled');
}
Expand Down

0 comments on commit 17678c3

Please sign in to comment.