Skip to content

Commit d4913a9

Browse files
Fix: transaction exec
1 parent ab2e521 commit d4913a9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/storage/postgres/transaction.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,8 @@ func (t *Transaction) Exec(ctx context.Context, query any, params ...any) (int,
100100
}
101101

102102
result, err := t.tx.ExecContext(ctx, query, params...)
103-
return result.RowsAffected(), err
103+
if err != nil {
104+
return 0, err
105+
}
106+
return result.RowsAffected(), nil
104107
}

0 commit comments

Comments
 (0)