mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复创建node节点的问题,修复windows session的问题
parent
ebc1b4975a
commit
cb4afabc91
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue