Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
Fix cleanup failure logic (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethvargo authored Aug 27, 2020
1 parent 37eca8b commit 8830e89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/database/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ func (db *Database) CreateCleanup(cType string) (*CleanupStatus, error) {
NotBefore: time.Now().UTC(),
}
if err := db.db.
Set("gorm:insert_option", "ON CONFLICT (uix_cleanup_statuses_type) DO NOTHING RETURNING *").
Create(cstat).
Set("gorm:insert_option", "ON CONFLICT (type) DO NOTHING").
FirstOrCreate(cstat).
Error; err != nil {
return nil, err
}
Expand Down

0 comments on commit 8830e89

Please sign in to comment.