Skip to content

Commit

Permalink
Change the FindDocumentHardDeletionCandidatesPerProject condition fro…
Browse files Browse the repository at this point in the history
…m less than to less than or equal to
  • Loading branch information
fourjae committed Feb 12, 2024
1 parent ad81cfe commit d45f2ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/backend/database/memory/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ func (d *DB) FindDocumentHardDeletionCandidatesPerProject(
break
}

if document.RemovedAt.Before(conditionDocumentHardDeletionGracefulPeriod) {
if !document.RemovedAt.After(conditionDocumentHardDeletionGracefulPeriod) {
documents = append(documents, document)
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/backend/database/mongo/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ func (c *Client) FindDocumentHardDeletionCandidatesPerProject(
var DocInfos []*database.DocInfo
cursor, err := c.collection(ColDocuments).Find(ctx, bson.M{
"project_id": project.ID,
"removed_at": bson.M{"$lt": hardDeletionGracefulPeriod},
"removed_at": bson.M{"$lte": hardDeletionGracefulPeriod},
}, options.Find().SetLimit(int64(candidatesLimit)))

if err != nil {
Expand Down

0 comments on commit d45f2ab

Please sign in to comment.