fix: 修复NodeChildrenAddAPI不支持patch方法的问题

pull/5887/head
Bai 4 years ago committed by Jiangjie.Bai
parent 06ed358fbc
commit 2ff01a4bb3

@ -221,7 +221,8 @@ class NodeAddChildrenApi(generics.UpdateAPIView):
serializer_class = serializers.NodeAddChildrenSerializer
instance = None
def put(self, request, *args, **kwargs):
def update(self, request, *args, **kwargs):
""" 同时支持 put 和 patch 方法"""
instance = self.get_object()
node_ids = request.data.get("nodes")
children = Node.objects.filter(id__in=node_ids)

Loading…
Cancel
Save