]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Missed PAPERLESS_COMMENTS_ENABLED code
authorMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Mon, 8 Aug 2022 00:30:49 +0000 (17:30 -0700)
committerMichael Shamoon <4887959+shamoon@users.noreply.github.com>
Wed, 24 Aug 2022 02:19:21 +0000 (19:19 -0700)
src/documents/views.py

index 9713e5d954c5a445c32d6926c10dd87b2e6af056..41f652905fba57deaa8de5f89d05fe754df4b023 100644 (file)
@@ -21,7 +21,6 @@ from django.db.models.functions import Lower
 from django.http import Http404
 from django.http import HttpResponse
 from django.http import HttpResponseBadRequest
-from django.http import HttpResponseNotAllowed
 from django.utils.decorators import method_decorator
 from django.utils.translation import get_language
 from django.views.decorators.cache import cache_control
@@ -399,9 +398,6 @@ class DocumentViewSet(
 
     @action(methods=["get", "post", "delete"], detail=True)
     def comments(self, request, pk=None):
-        if settings.PAPERLESS_COMMENTS_ENABLED is not True:
-            return HttpResponseNotAllowed("comment function is disabled")
-
         try:
             doc = Document.objects.get(pk=pk)
         except Document.DoesNotExist: