fix: contracts table fix, document file added
This commit is contained in:
@@ -4,13 +4,13 @@ from drf_spectacular.utils import extend_schema
|
||||
from rest_framework.permissions import AllowAny, IsAdminUser # type: ignore
|
||||
from rest_framework.viewsets import ModelViewSet # type: ignore
|
||||
from rest_framework.generics import GenericAPIView # type: ignore
|
||||
from core.utils.views import BaseApiViewMixin
|
||||
|
||||
from rest_framework.parsers import MultiPartParser # type: ignore
|
||||
from rest_framework.request import HttpRequest # type: ignore
|
||||
from rest_framework.response import Response # type: ignore
|
||||
from rest_framework import status # type: ignore
|
||||
|
||||
from django_core.mixins import BaseViewSetMixin # type: ignore
|
||||
from core.utils.views import BaseApiViewMixin
|
||||
from core.apps.contracts.models import (
|
||||
ContractModel,
|
||||
ContractAttachedFileModel,
|
||||
@@ -36,6 +36,7 @@ class ContractViewSet(BaseViewSetMixin, ModelViewSet):
|
||||
queryset = ContractModel.objects.all()
|
||||
serializer_class = ListContractSerializer
|
||||
permission_classes = [AllowAny]
|
||||
parser_classes = [MultiPartParser]
|
||||
|
||||
action_permission_classes = { # type: ignore
|
||||
"list": [IsAdminUser],
|
||||
|
||||
Reference in New Issue
Block a user