]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix MixedContentTypeError in add_inbox_tags handler 3212/head
authorMoritz 'e1mo' Fromm <git@e1mo.de>
Thu, 27 Apr 2023 16:00:30 +0000 (18:00 +0200)
committerMoritz 'e1mo' Fromm <git@e1mo.de>
Thu, 27 Apr 2023 16:15:05 +0000 (18:15 +0200)
The fact that Tags were fetched while the `view_documenttype` permission
was validated caused a MixedContentTypeError, thus the document
consumptio to fail because the list of available tags could not be
fetched.

src/documents/signals/handlers.py

index 4abb772ce686f04ced9d925c4353b2c86a1b44d9..b41712a6f3dcd078458dccf86014190aa1f8de88 100644 (file)
@@ -37,7 +37,7 @@ def add_inbox_tags(sender, document=None, logging_group=None, **kwargs):
     if document.owner is not None:
         tags = get_objects_for_user_owner_aware(
             document.owner,
-            "documents.view_documenttype",
+            "documents.view_tag",
             Tag,
         )
     else: