mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-18 17:13:00 +08:00
Fix head document requests endpoint
This commit is contained in:
parent
14f21bd2a8
commit
d5477a1e1a
2 changed files with 3 additions and 2 deletions
|
@ -124,7 +124,7 @@ class DocumentRequestSerializer(serializers.ModelSerializer):
|
|||
|
||||
|
||||
class FullDocumentRequestSerializer(serializers.ModelSerializer):
|
||||
documents = DocumentRequestUnitWithFileSerializer()
|
||||
documents = DocumentRequestUnitWithFileSerializer(many=True)
|
||||
requester = serializers.SlugRelatedField(
|
||||
many=False,
|
||||
slug_field="full_name",
|
||||
|
|
|
@ -7,6 +7,7 @@ from .serializers import (
|
|||
DocumentRequestCreationSerializer,
|
||||
DocumentRequestSerializer,
|
||||
DocumentRequestUpdateSerializer,
|
||||
FullDocumentRequestSerializer
|
||||
)
|
||||
|
||||
from .models import DocumentRequest
|
||||
|
@ -49,7 +50,7 @@ class DocumentRequestFullListView(generics.ListAPIView):
|
|||
"""
|
||||
|
||||
http_method_names = ["get"]
|
||||
serializer_class = DocumentRequestSerializer
|
||||
serializer_class = FullDocumentRequestSerializer
|
||||
pagination_class = PageNumberPagination
|
||||
permission_classes = [IsAuthenticated, IsStaff]
|
||||
queryset = DocumentRequest.objects.all()
|
||||
|
|
Loading…
Reference in a new issue