From 05941616df7788efc49daae2356124acf3e61e85 Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Mon, 22 Nov 2021 20:48:16 +0800 Subject: [PATCH] Fix: node should not be refreshed when editing node with status=inactive --- service/admin/node.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/admin/node.go b/service/admin/node.go index a82b3a7..e5294c6 100644 --- a/service/admin/node.go +++ b/service/admin/node.go @@ -24,7 +24,10 @@ func (service *AddNodeService) Add() serializer.Response { } } - cluster.Default.Add(&service.Node) + if service.Node.Status == model.NodeActive { + cluster.Default.Add(&service.Node) + } + return serializer.Response{Data: service.Node.ID} }