1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-10-31 16:00:05 -04:00

OFX imports: Convert 'GetSecurity' to use existing SQL transaction

This commit is contained in:
Aaron Lindsay 2017-09-20 20:13:29 -04:00
parent 03b79d8c4a
commit d979849213

View File

@ -174,7 +174,7 @@ func ofxImportHelper(r io.Reader, w http.ResponseWriter, user *User, accountid i
split := new(Split) split := new(Split)
r := new(big.Rat) r := new(big.Rat)
r.Neg(&imbalance) r.Neg(&imbalance)
security, err := GetSecurity(imbalanced_security, user.UserId) security, err := GetSecurityTx(sqltransaction, imbalanced_security, user.UserId)
if err != nil { if err != nil {
sqltransaction.Rollback() sqltransaction.Rollback()
WriteError(w, 999 /*Internal Error*/) WriteError(w, 999 /*Internal Error*/)