mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 16:25:33 +01:00
Owner/name unique constraint violation should exclude self
This commit is contained in:
parent
a9707f0ab0
commit
cbd80615be
3 changed files with 24 additions and 15 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue