From 37b6310ad0f594ec41ef3604d6adbbb8797afc5d Mon Sep 17 00:00:00 2001 From: dankito Date: Sun, 1 Sep 2024 22:23:42 +0200 Subject: [PATCH] Fixed deserializing empty enumsString --- .../net/codinux/banking/dataaccess/SqliteBankingRepository.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/SqliteBankingRepository.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/SqliteBankingRepository.kt index 53a644b..c48ed98 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/SqliteBankingRepository.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/SqliteBankingRepository.kt @@ -214,7 +214,7 @@ open class SqliteBankingRepository( enums.joinToString(",") { it.name } private fun > mapEnumSet(enumsString: String, values: EnumEntries): Set = - enumsString.split(',').map { mapToEnum(it, values) }.toSet() + enumsString.split(',').filterNot { it.isBlank() }.map { mapToEnum(it, values) }.toSet() @JvmName("mapIntNullable") @JsName("mapIntNullable")