fix :view.py

This commit is contained in:
zty 2024-07-08 14:48:58 +08:00
parent b0d2c93d3d
commit f8bd494144
1 changed files with 3 additions and 2 deletions

View File

@ -365,9 +365,10 @@ class ParsePdfViewSet(RbacFilterSet, CreateUpdateCustomMixin, ModelViewSet):
queryset = Parsepdf.objects.all().order_by('id')
serializer_class = ParsepdfSerializer
filterset_fields = ['belong_dept', 'annual']
perms_map = {'get': '*', 'post': 'pdf_create'}
#解析pdf到excel
@action(detail=False, methods=['post'])
@action(detail=False, methods=['post'], perms_map={'post':'pdf_create'})
@transaction.atomic
def parse_pdf(self, request, *args, **kwargs):
"""