mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Fix issue where the creation of resource policies failed even if successfully
This commit is contained in:
@@ -101,7 +101,9 @@ export class ResourcePolicyCreateComponent implements OnInit {
|
|||||||
first((response: RemoteData<ResourcePolicy>) => !response.isResponsePending)
|
first((response: RemoteData<ResourcePolicy>) => !response.isResponsePending)
|
||||||
).subscribe((responseRD: RemoteData<ResourcePolicy>) => {
|
).subscribe((responseRD: RemoteData<ResourcePolicy>) => {
|
||||||
this.processing$.next(false);
|
this.processing$.next(false);
|
||||||
if (responseRD.hasSucceeded) {
|
// NOTE Currently due to a bug a successful 201 response has failed
|
||||||
|
// TODO review it when https://github.com/DSpace/dspace-angular/issues/739 is fixed
|
||||||
|
if (responseRD.hasSucceeded || responseRD.statusCode === 201) {
|
||||||
this.notificationsService.success(null, this.translate.get('resource-policies.create.page.success.content'));
|
this.notificationsService.success(null, this.translate.get('resource-policies.create.page.success.content'));
|
||||||
this.redirectToAuthorizationsPage();
|
this.redirectToAuthorizationsPage();
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user