diff --git a/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts b/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts index 9c4441c323..20b79e78c9 100644 --- a/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts +++ b/libs/api/repository/src/lib/gn4/organizations/organizations-from-metadata.service.ts @@ -53,14 +53,16 @@ interface IncompleteOrganization { export class OrganizationsFromMetadataService implements OrganizationsServiceInterface { - geonetworkVersion$ = this.siteApiService.getSiteOrPortalDescription().pipe( + geonetworkVersion$ = of(true).pipe( + switchMap(() => this.siteApiService.getSiteOrPortalDescription()), map((info) => info['system/platform/version']), shareReplay(1) ) - private groups$: Observable = this.groupsApiService - .getGroups() - .pipe(shareReplay()) + private groups$: Observable = of(true).pipe( + switchMap(() => this.groupsApiService.getGroups()), + shareReplay() + ) private organisationsAggs$: Observable = this.geonetworkVersion$.pipe( switchMap((version) =>