From a1b128380c7dcc1232202f3d715b3ce353bc9319 Mon Sep 17 00:00:00 2001 From: Youngteac Hong Date: Wed, 16 Oct 2024 18:46:27 +0900 Subject: [PATCH] Fix incorrect condition for skip detachment --- server/clients/clients.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/clients/clients.go b/server/clients/clients.go index e8a299b86..13244c168 100644 --- a/server/clients/clients.go +++ b/server/clients/clients.go @@ -64,11 +64,11 @@ func Deactivate( defer systemClient.Close() for docID, clientDocInfo := range info.Documents { - // TODO(hackerwins): Solve N+1 - if clientDocInfo.Status == database.DocumentDetached { + if clientDocInfo.Status != database.DocumentAttached { continue } + // TODO(hackerwins): Solve N+1 docInfo, err := be.DB.FindDocInfoByRefKey(ctx, types.DocRefKey{ ProjectID: project.ID, DocID: docID,