From 86891863bc03d873f2cb3e16ac9f9e8497486f50 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Fri, 2 Feb 2024 19:07:10 +0100 Subject: [PATCH] [CST-13245] Fix isMemberOf method --- src/app/core/eperson/group-data.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/core/eperson/group-data.service.ts b/src/app/core/eperson/group-data.service.ts index 03aa1ea04d8..02a68a8513e 100644 --- a/src/app/core/eperson/group-data.service.ts +++ b/src/app/core/eperson/group-data.service.ts @@ -56,7 +56,7 @@ export class GroupDataService extends IdentifiableDataService implements public subgroupsEndpoint = 'subgroups'; private createData: CreateData; - private searchData: SearchData; + private searchData: SearchDataImpl; private patchData: PatchData; private deleteData: DeleteData; @@ -91,9 +91,9 @@ export class GroupDataService extends IdentifiableDataService implements const options = new FindListOptions(); options.searchParams = [new RequestParam('groupName', groupName)]; - return this.searchBy(searchHref, options).pipe( + return this.findByHref(this.searchData.getSearchByHref(searchHref, options)).pipe( getRemoteDataPayload(), - map((groups: PaginatedList) => groups.totalElements > 0), + map((group: Group) => isNotEmpty(group)), catchError(() => observableOf(false)), ); }