]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: mark fields for created objects as dirty (#10022)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Sat, 24 May 2025 14:28:04 +0000 (07:28 -0700)
committerGitHub <noreply@github.com>
Sat, 24 May 2025 14:28:04 +0000 (07:28 -0700)
src-ui/src/app/components/document-detail/document-detail.component.ts

index 7c3e576552b56520cc06771fbd292e561bd119df..1bfac60f0a4c89e0dc396939225abb2db254e38e 100644 (file)
@@ -698,6 +698,7 @@ export class DocumentDetailComponent
       .subscribe(({ newDocumentType, documentTypes }) => {
         this.documentTypes = documentTypes.results
         this.documentForm.get('document_type').setValue(newDocumentType.id)
+        this.documentForm.get('document_type').markAsDirty()
       })
   }
 
@@ -721,6 +722,7 @@ export class DocumentDetailComponent
       .subscribe(({ newCorrespondent, correspondents }) => {
         this.correspondents = correspondents.results
         this.documentForm.get('correspondent').setValue(newCorrespondent.id)
+        this.documentForm.get('correspondent').markAsDirty()
       })
   }
 
@@ -742,6 +744,7 @@ export class DocumentDetailComponent
       .subscribe(({ newStoragePath, storagePaths }) => {
         this.storagePaths = storagePaths.results
         this.documentForm.get('storage_path').setValue(newStoragePath.id)
+        this.documentForm.get('storage_path').markAsDirty()
       })
   }