1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-25 23:23:21 -05:00

Don't delete splits when updating them

This commit is contained in:
Aaron Lindsay 2017-05-31 08:18:21 -04:00
parent 8855107e52
commit 11c7f199c4

View File

@ -352,6 +352,7 @@ func UpdateTransaction(t *Transaction, user *User) error {
transaction.Rollback()
return errors.New("Updated more than one transaction split")
}
delete(s_map, t.Splits[i].SplitId)
} else {
t.Splits[i].SplitId = -1
err := transaction.Insert(t.Splits[i])