Browse Source

return the result on transaction (#1725)

return the result on transaction

Reviewed-on: #1725
pull/1729/head
Lunny Xiao 2 weeks ago
parent
commit
9b41b879a7
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      engine.go

+ 2
- 2
engine.go View File

@ -1263,11 +1263,11 @@ func (engine *Engine) Transaction(f func(*Session) (interface{}, error)) (interf
result, err := f(session)
if err != nil {
return nil, err
return result, err
}
if err := session.Commit(); err != nil {
return nil, err
return result, err
}
return result, nil

Loading…
Cancel
Save