forked from mirror/gorm
Assign transaction error to db
This commit is contained in:
parent
d483ffa45c
commit
7701c88507
|
@ -11,6 +11,8 @@ func BeginTransaction(db *gorm.DB) {
|
||||||
db.InstanceSet("gorm:started_transaction", true)
|
db.InstanceSet("gorm:started_transaction", true)
|
||||||
} else if tx.Error == gorm.ErrInvalidTransaction {
|
} else if tx.Error == gorm.ErrInvalidTransaction {
|
||||||
tx.Error = nil
|
tx.Error = nil
|
||||||
|
} else {
|
||||||
|
db.Error = tx.Error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue