1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-03 04:38:38 -04:00

Use default currency for top-level 'Trading' account

Also add missing transaction.Rollback() calls on early returns in
GetAccountTransactions()
This commit is contained in:
2017-09-21 21:00:30 -04:00
parent d0d6ea3a78
commit e38c49a556
2 changed files with 9 additions and 2 deletions

View File

@ -834,11 +834,13 @@ func GetAccountTransactions(user *User, accountid int64, sort string, page uint6
}
atl.TotalTransactions = count
security, err := GetSecurity(atl.Account.SecurityId, user.UserId)
security, err := GetSecurityTx(transaction, atl.Account.SecurityId, user.UserId)
if err != nil {
transaction.Rollback()
return nil, err
}
if security == nil {
transaction.Rollback()
return nil, errors.New("Security not found")
}