fixed validation error message
This commit is contained in:
parent
8e899db021
commit
f383ef520f
|
@ -384,7 +384,7 @@ public class DmpServiceImpl implements DmpService {
|
|||
.groupIds(oldDmpEntity.getGroupId())
|
||||
.isActive(IsActive.Active)
|
||||
.count();
|
||||
if (notFinalizedCount > 0) throw new MyValidationException("Already created draft for this template");
|
||||
if (notFinalizedCount > 0) throw new MyValidationException(this.errors.getModelValidation().getCode(), "Already created draft for this template");
|
||||
|
||||
DmpEntity newDmp = new DmpEntity();
|
||||
newDmp.setId(UUID.randomUUID());
|
||||
|
|
|
@ -75,6 +75,8 @@ export class NewVersionDmpDialogComponent extends BaseComponent {
|
|||
}
|
||||
|
||||
onCallbackError(error: any) {
|
||||
this.uiNotificationService.snackBarNotification(error.error.message ? error.error.message : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Error);
|
||||
this.uiNotificationService.snackBarNotification(
|
||||
error.error.message ? error.error.message :
|
||||
error.error.error ? error.error.error : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-DELETE'), SnackBarNotificationLevel.Error);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue