fix auto-delete (#140)

This commit is contained in:
Thibault "bui" Koechlin 2020-07-20 11:52:00 +02:00 committed by GitHub
parent 0864f13cb8
commit 66161bc8ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,7 @@ func (c *Context) CleanUpRecordsByAge() error {
//look for soft-deleted events that are OLDER than maxDurationRetention
ret := c.Db.Unscoped().Table("ban_applications").Where("deleted_at is not NULL").
Where("deleted_at > ?", time.Now().Add(-c.maxDurationRetention)).
Where("deleted_at < ?", time.Now().Add(-c.maxDurationRetention)).
Order("updated_at desc").Find(&sos)
if ret.Error != nil {