Updating BankAccount.bookedTransactions only if we retrieved transactions and adding it to existing list instead of replacing existing bookedTransactions list
This commit is contained in:
parent
3b05a8b9c8
commit
b2fb04372f
|
@ -91,7 +91,11 @@ open class FinTsModelMapper {
|
||||||
bankAccount.lastTransactionsRetrievalTime = retrievalTime
|
bankAccount.lastTransactionsRetrievalTime = retrievalTime
|
||||||
}
|
}
|
||||||
|
|
||||||
bankAccount.bookedTransactions = map(accountTransactionsResponse)
|
if (accountTransactionsResponse.bookedTransactions.isNotEmpty()) {
|
||||||
|
bankAccount.bookedTransactions = bankAccount.bookedTransactions.toMutableList().apply {
|
||||||
|
addAll(map(accountTransactionsResponse))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue