Little refactoring

This commit is contained in:
dankito 2024-10-15 21:55:16 +02:00
parent 684b3fb40e
commit f89de94aa7
1 changed files with 3 additions and 3 deletions

View File

@ -56,12 +56,12 @@ open class FinTsClient(
open suspend fun getAccountDataAsync(param: GetAccountDataParameter): GetAccountDataResponse {
val basicAccountDataResponse = getRequiredDataToSendUserJobs(param)
val bank = basicAccountDataResponse.finTsModel
if (basicAccountDataResponse.successful == false || param.retrieveOnlyAccountInfo || basicAccountDataResponse.finTsModel == null) {
if (basicAccountDataResponse.successful == false || param.retrieveOnlyAccountInfo || bank == null) {
return GetAccountDataResponse(basicAccountDataResponse.error, basicAccountDataResponse.errorMessage, null,
basicAccountDataResponse.messageLog, basicAccountDataResponse.finTsModel)
basicAccountDataResponse.messageLog, bank)
} else {
val bank = basicAccountDataResponse.finTsModel!!
return getAccountData(param, bank, bank.accounts, basicAccountDataResponse.messageLog)
}
}