FIX: Delete unconfirmed AND expired email tokens only (#15089)

This commit is contained in:
Dan Ungureanu 2021-11-25 10:34:30 +02:00 committed by GitHub
parent fa8cd629f1
commit 6e2d4a14ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ module Jobs
def execute(args)
EmailToken
.where('NOT confirmed OR expired')
.where('NOT confirmed AND expired')
.where('created_at < ?', 1.month.ago)
.delete_all
end