Skip to content

Commit

Permalink
fix(dao/runner): remove duplicate key column hostname in OnConflict c…
Browse files Browse the repository at this point in the history
…lause
  • Loading branch information
joschahenningsen committed Feb 4, 2025
1 parent efc80f2 commit 0e7d164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dao/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (d runnerDao) Get(c context.Context, id uint) (res model.Runner, err error)
// Create a Runner.
func (d runnerDao) Create(c context.Context, it *model.Runner) error {
return d.db.WithContext(c).Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "hostname"}, {Name: "hostname"}}, // key column
Columns: []clause.Column{{Name: "hostname"}}, // key column

Check failure on line 41 in dao/runner.go

View workflow job for this annotation

GitHub Actions / lint (./worker)

File is not properly formatted (gofmt)

Check failure on line 41 in dao/runner.go

View workflow job for this annotation

GitHub Actions / lint (./worker/edge)

File is not properly formatted (gofmt)
DoUpdates: clause.AssignmentColumns([]string{"port"}), // column needed to be updated
}).Create(it).Error
}
Expand Down

0 comments on commit 0e7d164

Please sign in to comment.