mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-06 13:36:07 +01:00
TagViewSet should use PassUserMixin
This commit is contained in:
parent
f100198a8a
commit
2fe7f8be46
1 changed files with 1 additions and 3 deletions
|
|
@ -178,7 +178,7 @@ class CorrespondentViewSet(ModelViewSet, PassUserMixin):
|
|||
)
|
||||
|
||||
|
||||
class TagViewSet(ModelViewSet):
|
||||
class TagViewSet(ModelViewSet, PassUserMixin):
|
||||
model = Tag
|
||||
|
||||
queryset = Tag.objects.annotate(document_count=Count("documents")).order_by(
|
||||
|
|
@ -186,8 +186,6 @@ class TagViewSet(ModelViewSet):
|
|||
)
|
||||
|
||||
def get_serializer_class(self, *args, **kwargs):
|
||||
# from UserPassMixin
|
||||
kwargs.setdefault("user", self.request.user)
|
||||
if int(self.request.version) == 1:
|
||||
return TagSerializerVersion1
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue