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
This commit is contained in:
Yury Bondarenko
2022-09-30 14:38:29 +02:00
parent 6f9d31034c
commit 379d78eaa2

View File

@@ -238,7 +238,6 @@ export class EPeopleRegistryComponent implements OnInit, OnDestroy {
this.epersonService.deleteEPerson(ePerson).pipe(getFirstCompletedRemoteData()).subscribe((restResponse: RemoteData<NoContent>) => {
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);
}