mirror of
https://github.com/aclindsa/moneygo.git
synced 2025-07-12 07:51:08 -04:00
Move splits/transactions to store
This commit is contained in:
@ -187,7 +187,7 @@ func ofxImportHelper(tx *db.Tx, r io.Reader, user *models.User, accountid int64)
|
||||
split.SecurityId = -1
|
||||
}
|
||||
|
||||
exists, err := SplitAlreadyImported(tx, split)
|
||||
exists, err := tx.SplitExists(split)
|
||||
if err != nil {
|
||||
log.Print("Error checking if split was already imported:", err)
|
||||
return NewError(999 /*Internal Error*/)
|
||||
@ -202,7 +202,7 @@ func ofxImportHelper(tx *db.Tx, r io.Reader, user *models.User, accountid int64)
|
||||
}
|
||||
|
||||
for _, transaction := range transactions {
|
||||
err := InsertTransaction(tx, &transaction, user)
|
||||
err := tx.InsertTransaction(&transaction, user)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
return NewError(999 /*Internal Error*/)
|
||||
|
Reference in New Issue
Block a user