From 063f6c1d5a4b7d3cc7e7bbac2cafd28db6be6a29 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 16 May 2022 00:01:57 -0700 Subject: [PATCH] only pass created_date from frontend --- src-ui/src/app/services/rest/document.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src-ui/src/app/services/rest/document.service.ts b/src-ui/src/app/services/rest/document.service.ts index 3b242543e..880d119dc 100644 --- a/src-ui/src/app/services/rest/document.service.ts +++ b/src-ui/src/app/services/rest/document.service.ts @@ -121,6 +121,12 @@ export class DocumentService extends AbstractPaperlessService return url } + update(o: PaperlessDocument): Observable { + // we want to only set created_date + o.created = undefined + return super.update(o) + } + uploadDocument(formData) { return this.http.post( this.getResourceUrl(null, 'post_document'),