mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-26 23:42:29 -05:00
Don't clear SplitId's when updating transaction
This caused new splits to be created, instead of re-using existing splits and SplitId's.
This commit is contained in:
parent
6762b3e721
commit
f9a4d0a99a
@ -580,7 +580,6 @@ func TransactionHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for i := range transaction.Splits {
|
for i := range transaction.Splits {
|
||||||
transaction.Splits[i].SplitId = -1
|
|
||||||
_, err := GetAccount(transaction.Splits[i].AccountId, user.UserId)
|
_, err := GetAccount(transaction.Splits[i].AccountId, user.UserId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
WriteError(w, 3 /*Invalid Request*/)
|
WriteError(w, 3 /*Invalid Request*/)
|
||||||
|
Loading…
Reference in New Issue
Block a user