Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
Fix nil after commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaokongsheng committed Mar 15, 2019
1 parent e4d8b88 commit aa2bf61
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion orm/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ func (tx *DBTx) Close() error {
return tx.tx.Rollback()
}
err := tx.tx.Commit()
tx.afterCommit(err)
if tx.afterCommit != nil {
tx.afterCommit(err)
}
return err
}

Expand Down

0 comments on commit aa2bf61

Please sign in to comment.