From 566c04f080ce70bf9ee6440626ef6b8706f937e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sat, 7 Aug 2021 10:12:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BE=B9=E7=BC=98=E8=8A=82=E7=82=B9=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=9B=86=E7=BE=A4=E7=9A=84=E6=97=B6=E5=80=99=E8=A7=86?= =?UTF-8?q?=E4=B8=BA=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/db/models/node_dao.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/db/models/node_dao.go b/internal/db/models/node_dao.go index b1971911..0284fe9d 100644 --- a/internal/db/models/node_dao.go +++ b/internal/db/models/node_dao.go @@ -1238,6 +1238,11 @@ func (this *NodeDAO) DeleteNodeFromCluster(tx *dbs.Tx, nodeId int64, clusterId i op.Id = nodeId op.ClusterId = newClusterId op.SecondaryClusterIds = secondaryClusterIdsJSON + + if newClusterId == 0 { + op.State = NodeStateDisabled + } + return this.Save(tx, op) }