From 379d78eaa2a403ab48b3b4eeec25ba35b68c1d98 Mon Sep 17 00:00:00 2001 From: Yury Bondarenko Date: Fri, 30 Sep 2022 14:38:29 +0200 Subject: [PATCH] Fix infinite loop when deleting an EPerson The reset() call is no longer needed in this case, since invalidation on delete is handled within the data service We still need this method to properly update the page after creating a new EPerson --- .../epeople-registry/epeople-registry.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/access-control/epeople-registry/epeople-registry.component.ts b/src/app/access-control/epeople-registry/epeople-registry.component.ts index b99304d037..55233d8173 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.component.ts +++ b/src/app/access-control/epeople-registry/epeople-registry.component.ts @@ -238,7 +238,6 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy { this.epersonService.deleteEPerson(ePerson).pipe(getFirstCompletedRemoteData()).subscribe((restResponse: RemoteData) => { if (restResponse.hasSucceeded) { this.notificationsService.success(this.translateService.get(this.labelPrefix + 'notification.deleted.success', {name: ePerson.name})); - this.reset(); } else { this.notificationsService.error('Error occured when trying to delete EPerson with id: ' + ePerson.id + ' with code: ' + restResponse.statusCode + ' and message: ' + restResponse.errorMessage); }