Browse Source

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

pull/5953/head^2
Bai 4 years ago committed by xinwen
parent
commit
4a1fc0e2ac
  1. 3
      apps/assets/api/node.py

3
apps/assets/api/node.py

@ -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