Commit cb4afabc authored by ibuler's avatar ibuler

[Bugfix] 修复创建node节点的问题,修复windows session的问题

parent ebc1b497
......@@ -51,10 +51,10 @@ class NodeViewSet(BulkModelViewSet):
else:
return serializers.NodeSerializer
# def perform_create(self, serializer):
# child_key = Node.root().get_next_child_key()
# serializer.validated_data["key"] = child_key
# serializer.save()
def perform_create(self, serializer):
child_key = Node.root().get_next_child_key()
serializer.validated_data["key"] = child_key
serializer.save()
class NodeWithAssetsApi(generics.ListAPIView):
......
......@@ -108,6 +108,9 @@ class StatusViewSet(viewsets.ModelViewSet):
task_serializer_class = TaskSerializer
def create(self, request, *args, **kwargs):
if self.request.query_params.get("from_guacamole", None):
return Response({"msg": "From guacamole, not support now"})
self.handle_sessions()
super().create(request, *args, **kwargs)
tasks = self.request.user.terminal.task_set.filter(is_finished=False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment