Owner/name unique constraint violation should exclude self

This commit is contained in:
shamoon
2023-03-23 07:31:31 -07:00
parent 4ac83527ea
commit 63be51b361
3 changed files with 24 additions and 15 deletions

View File

@@ -167,8 +167,13 @@ export abstract class ManagementListComponent<T extends ObjectWithId>
activeModal.componentInstance.succeeded.subscribe({
next: () => {
if (activeModal.componentInstance.error) {
const errorDetail = activeModal.componentInstance.error.error
? activeModal.componentInstance.error.error[0]
: null
this.toastService.showInfo(
$localize`Error occurred while saving ${this.typeName} : ${activeModal.componentInstance.error}.`
$localize`Error occurred while saving ${this.typeName}${
errorDetail ? ': ' + errorDetail : ''
}.`
)
} else {
this.reloadData()