fix :view.py
This commit is contained in:
parent
b0d2c93d3d
commit
f8bd494144
|
@ -365,9 +365,10 @@ class ParsePdfViewSet(RbacFilterSet, CreateUpdateCustomMixin, ModelViewSet):
|
||||||
queryset = Parsepdf.objects.all().order_by('id')
|
queryset = Parsepdf.objects.all().order_by('id')
|
||||||
serializer_class = ParsepdfSerializer
|
serializer_class = ParsepdfSerializer
|
||||||
filterset_fields = ['belong_dept', 'annual']
|
filterset_fields = ['belong_dept', 'annual']
|
||||||
|
perms_map = {'get': '*', 'post': 'pdf_create'}
|
||||||
|
|
||||||
#解析pdf到excel
|
#解析pdf到excel
|
||||||
@action(detail=False, methods=['post'])
|
@action(detail=False, methods=['post'], perms_map={'post':'pdf_create'})
|
||||||
@transaction.atomic
|
@transaction.atomic
|
||||||
def parse_pdf(self, request, *args, **kwargs):
|
def parse_pdf(self, request, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue