Fixes bug on redirect if error occurs on opening /datasets/edit/:id (Issue #199)
This commit is contained in:
parent
b40562f481
commit
a09abc2fbc
|
@ -133,11 +133,10 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
this.loadDatasetProfiles();
|
this.loadDatasetProfiles();
|
||||||
this.registerFormListeners();
|
this.registerFormListeners();
|
||||||
// this.availableProfiles = this.datasetWizardModel.dmp.profiles;
|
// this.availableProfiles = this.datasetWizardModel.dmp.profiles;
|
||||||
|
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-WIZARD.MESSAGES.DATAESET-NOT-FOUND'), SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(this.language.instant('DATASET-WIZARD.MESSAGES.DATAESET-NOT-FOUND'), SnackBarNotificationLevel.Error);
|
||||||
this.router.navigate(['/plans']);
|
this.router.navigate(['/datasets/edit/' + this.itemId]);
|
||||||
return observableOf(null);
|
return observableOf(null);
|
||||||
});
|
});
|
||||||
} else if (dmpId != null) {
|
} else if (dmpId != null) {
|
||||||
|
@ -227,7 +226,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
.pipe(takeUntil(this._destroyed)).pipe(
|
.pipe(takeUntil(this._destroyed)).pipe(
|
||||||
catchError((error: any) => {
|
catchError((error: any) => {
|
||||||
this.uiNotificationService.snackBarNotification(error.error.message, SnackBarNotificationLevel.Error);
|
this.uiNotificationService.snackBarNotification(error.error.message, SnackBarNotificationLevel.Error);
|
||||||
this.router.navigate(['/explore']);
|
this.router.navigate(['/datasets/publicEdit/' + this.publicId]);
|
||||||
return observableOf(null);
|
return observableOf(null);
|
||||||
}))
|
}))
|
||||||
.subscribe(data => {
|
.subscribe(data => {
|
||||||
|
|
Loading…
Reference in New Issue