Skip to content

Commit

Permalink
Fix incorrect condition for skip detachment
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed Oct 16, 2024
1 parent 2c225c7 commit a1b1283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/clients/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a1b1283

Please sign in to comment.