Skip to content

Commit

Permalink
PMM-12624 revert transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Dec 22, 2023
1 parent 59641d9 commit 9ee158e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions managed/services/inventory/agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (as *AgentsService) changeAgent(agentID string, common *inventoryv1.ChangeC
//nolint:unparam
func (as *AgentsService) List(ctx context.Context, filters models.AgentFilters) ([]inventoryv1.Agent, error) {
var res []inventoryv1.Agent
e := as.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
e := as.db.InTransaction(func(tx *reform.TX) error {
got := 0
if filters.PMMAgentID != "" {
got++
Expand Down Expand Up @@ -151,7 +151,7 @@ func (as *AgentsService) List(ctx context.Context, filters models.AgentFilters)
// Get selects a single Agent by ID.
func (as *AgentsService) Get(ctx context.Context, id string) (inventoryv1.Agent, error) { //nolint:ireturn,unparam
var res inventoryv1.Agent
e := as.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error {
e := as.db.InTransaction(func(tx *reform.TX) error {
row, err := models.FindAgentByID(tx.Querier, id)
if err != nil {
return err
Expand Down

0 comments on commit 9ee158e

Please sign in to comment.