Skip to content

Commit

Permalink
feat(maestro): fix args sent to find.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Pegoraro committed Oct 2, 2023
1 parent 482831c commit 182e0c9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions maestro/deployment/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ func (r *repositoryService) Remove(ctx context.Context, ownerId string, sinkId s
func (r *repositoryService) FindByOwnerAndSink(ctx context.Context, ownerId string, sinkId string) (*Deployment, error) {
tx := r.db.MustBeginTx(ctx, nil)
var rows []Deployment
args := []interface{}{ownerId, sinkId}
query := `
SELECT id,
owner_id,
Expand All @@ -165,7 +164,7 @@ func (r *repositoryService) FindByOwnerAndSink(ctx context.Context, ownerId stri
last_collector_stop_time
FROM deployments WHERE owner_id = ? AND sink_id = ?
`
err := tx.SelectContext(ctx, &rows, query, args)
err := tx.SelectContext(ctx, &rows, query, ownerId, sinkId)
if err != nil {
_ = tx.Rollback()
return nil, err
Expand Down

0 comments on commit 182e0c9

Please sign in to comment.