return nil when no transaction is opened

pull/5913/head
Sorawis Nilparuk 10 months ago
parent e000aeafcd
commit f44e2c1df6

@ -209,7 +209,7 @@ func (p *Postgres) RollbackRun(ctx context.Context) error {
p.tx = nil
}()
if p.tx == nil {
return errors.New(ctx, errors.MigrationIntegrity, op, "no pending transaction")
return nil
}
if err := p.tx.Rollback(); err != nil {
if errors.Is(err, sql.ErrTxDone) {

Loading…
Cancel
Save