From 8ef77df651c27d041085899690e8aa0c448c64fe Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Thu, 21 May 2020 12:19:24 +0200 Subject: [PATCH] Fixed issue with resource policies list that was not updated after a delete --- .../shared/resource-policies/resource-policies.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/shared/resource-policies/resource-policies.component.ts b/src/app/shared/resource-policies/resource-policies.component.ts index 3fb690111e..a5db9474ad 100644 --- a/src/app/shared/resource-policies/resource-policies.component.ts +++ b/src/app/shared/resource-policies/resource-policies.component.ts @@ -112,6 +112,7 @@ export class ResourcePoliciesComponent implements OnInit, OnDestroy { */ ngOnInit(): void { this.isActive = true; + this.requestService.removeByHrefSubstring(this.resourceUUID); this.initResourcePolicyLIst(); } @@ -134,6 +135,7 @@ export class ResourcePoliciesComponent implements OnInit, OnDestroy { */ deleteSelectedResourcePolicies(): void { this.processingDelete$.next(true); + this.requestService.removeByHrefSubstring(this.resourceUUID); const policiesToDelete: ResourcePolicyCheckboxEntry[] = this.resourcePoliciesEntries$.value .filter((entry: ResourcePolicyCheckboxEntry) => entry.checked); this.subs.push( @@ -244,8 +246,6 @@ export class ResourcePoliciesComponent implements OnInit, OnDestroy { * Initialize the resource's policies list */ initResourcePolicyLIst() { - // TODO to be reviewed when https://github.com/DSpace/dspace-angular/issues/644 will be resolved - this.requestService.removeByHrefSubstring(this.resourceUUID); this.resourcePolicyService.searchByResource(this.resourceUUID, null, followLink('eperson'), followLink('group')).pipe( filter(() => this.isActive),