mirror of
https://github.com/lemeow125/DocManagerBackend.git
synced 2025-01-19 01:23:02 +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):
|
class FullDocumentRequestSerializer(serializers.ModelSerializer):
|
||||||
documents = DocumentRequestUnitWithFileSerializer()
|
documents = DocumentRequestUnitWithFileSerializer(many=True)
|
||||||
requester = serializers.SlugRelatedField(
|
requester = serializers.SlugRelatedField(
|
||||||
many=False,
|
many=False,
|
||||||
slug_field="full_name",
|
slug_field="full_name",
|
||||||
|
|
|
@ -7,6 +7,7 @@ from .serializers import (
|
||||||
DocumentRequestCreationSerializer,
|
DocumentRequestCreationSerializer,
|
||||||
DocumentRequestSerializer,
|
DocumentRequestSerializer,
|
||||||
DocumentRequestUpdateSerializer,
|
DocumentRequestUpdateSerializer,
|
||||||
|
FullDocumentRequestSerializer
|
||||||
)
|
)
|
||||||
|
|
||||||
from .models import DocumentRequest
|
from .models import DocumentRequest
|
||||||
|
@ -49,7 +50,7 @@ class DocumentRequestFullListView(generics.ListAPIView):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
http_method_names = ["get"]
|
http_method_names = ["get"]
|
||||||
serializer_class = DocumentRequestSerializer
|
serializer_class = FullDocumentRequestSerializer
|
||||||
pagination_class = PageNumberPagination
|
pagination_class = PageNumberPagination
|
||||||
permission_classes = [IsAuthenticated, IsStaff]
|
permission_classes = [IsAuthenticated, IsStaff]
|
||||||
queryset = DocumentRequest.objects.all()
|
queryset = DocumentRequest.objects.all()
|
||||||
|
|
Loading…
Reference in a new issue