From a7d5299c70bd5f79b8a0ae9be82b0e3e405180ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Wed, 29 Jun 2022 16:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E6=B3=A8=E5=9D=90=E6=A0=87=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/third/views_d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/third/views_d.py b/apps/third/views_d.py index a8613caf..b7de7189 100644 --- a/apps/third/views_d.py +++ b/apps/third/views_d.py @@ -50,7 +50,7 @@ class TDeviceViewSet(CustomGenericViewSet): _, res = dhClient.request(**dhapis['channel_list'], json=request.data) return Response(res) - @action(methods=['post'], detail=True, perms_map={'post': 'tdevice:label_location'}, + @action(methods=['put'], detail=True, perms_map={'put': 'tdevice:label_location'}, serializer_class=LabelLocationSerializer, lookup_field='code') def label_location(self, request): """