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
+1 -1
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