Selecting active TAN media first

This commit is contained in:
dankito 2024-08-26 22:25:09 +02:00
parent c564750832
commit dae6084ebb
1 changed files with 1 additions and 0 deletions

View File

@ -307,6 +307,7 @@ open class FinTsJobExecutor(
bank.selectedTanMedium = preferredTanMedium?.let { bank.tanMedia.firstOrNull { it.mediumName == preferredTanMedium } }
?: bank.selectedTanMedium?.let { selected -> bank.tanMedia.firstOrNull { it.mediumName == selected.mediumName } } // try to find selectedTanMedium in new TanMedia instances
?: bank.tanMedia.firstOrNull { it.status == TanMediumStatus.Aktiv && it.mediumName != null }
?: bank.tanMedia.firstOrNull { it.mediumName != null }
}