Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: always pass `remove_inbox_tags` from UI, dont require in API (#5962)

shamoona020d807d4b0
diff --git a/src-ui/src/app/services/rest/document.service.ts b/src-ui/src/app/services/rest/document.service.ts
index 37147b818..5c0f0a1dc 100644
--- a/src-ui/src/app/services/rest/document.service.ts
+++ b/src-ui/src/app/services/rest/document.service.ts
@@ -183,7 +183,7 @@ export class DocumentService extends AbstractPaperlessService<Document> {
update(o: Document): Observable<Document> {
// we want to only set created_date
o.created = undefined
- o.remove_inbox_tags = this.settingsService.get(
+ o.remove_inbox_tags = !!this.settingsService.get(
SETTINGS_KEYS.DOCUMENT_EDITING_REMOVE_INBOX_TAGS
)
return super.update(o)
diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py
index f4f92a1c9..adcb0d251 100644
--- a/src/documents/serialisers.py
+++ b/src/documents/serialisers.py
@@ -665,6 +665,8 @@ class DocumentSerializer(
remove_inbox_tags = serializers.BooleanField(
default=False,
write_only=True,
+ allow_null=True,
+ required=False,
)
def get_original_file_name(self, obj):