From 30ce014de678b4836beff06f36cb360288ea907d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 27 Aug 2024 10:50:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0threshold=5Fview?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_server/cms/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_server/cms/views.py b/test_server/cms/views.py index ad8f043..503dd69 100644 --- a/test_server/cms/views.py +++ b/test_server/cms/views.py @@ -86,7 +86,7 @@ class SourceViewSet(ModelViewSet): class ThresholdViewSet(ModelViewSet): perms_map = [ - {'get': '*'}, {'post': 'threshold_update'}, + {'get': 'threshold_view'}, {'post': 'threshold_update'}, {'put': 'threshold_update'}, {'delete': 'threshold_update'}] queryset = Threshold.objects.filter(is_delete=0) serializer_class = ThresholdSerializer @@ -95,7 +95,7 @@ class ThresholdViewSet(ModelViewSet): search_fields = ['chinese_name','cas', 'compound_cate', 'odor_type'] filterset_fields = ['source', 'compound_cate'] - @action(methods=['post'], detail=False, perms_map=[{'post':'threshold'}], serializer_class=PathSerializer) + @action(methods=['post'], detail=False, perms_map=[{'post':'threshold_update'}], serializer_class=PathSerializer) @transaction.atomic def daoru(self, request, *args, **kwargs): '''导入excel