]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: always refresh document after save
authorshamoon <4887959+shamoon@users.noreply.github.com>
Wed, 1 May 2024 19:07:19 +0000 (12:07 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Wed, 1 May 2024 19:07:27 +0000 (12:07 -0700)
src-ui/src/app/components/document-detail/document-detail.component.ts

index db0d16f5a549964e441111492930752f5a971a10..aea7ca47229b01299385c6e49a75e6ad7f1c35ff 100644 (file)
@@ -638,13 +638,17 @@ export class DocumentDetailComponent
           this.documentForm.patchValue(docValues)
           this.store.next(this.documentForm.value)
           this.openDocumentService.setDirty(this.document, false)
+          this.openDocumentService.save()
           this.toastService.showInfo($localize`Document saved successfully.`)
           this.networkActive = false
           this.error = null
-          close &&
+          if (close) {
             this.close(() =>
               this.openDocumentService.refreshDocument(this.documentId)
             )
+          } else {
+            this.openDocumentService.refreshDocument(this.documentId)
+          }
         },
         error: (error) => {
           this.networkActive = false