Fixed deserializing empty enumsString

This commit is contained in:
dankito 2024-09-01 22:23:42 +02:00
parent 7580c57433
commit 37b6310ad0
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ open class SqliteBankingRepository(
enums.joinToString(",") { it.name } enums.joinToString(",") { it.name }
private fun <E : Enum<E>> mapEnumSet(enumsString: String, values: EnumEntries<E>): Set<E> = private fun <E : Enum<E>> mapEnumSet(enumsString: String, values: EnumEntries<E>): Set<E> =
enumsString.split(',').map { mapToEnum(it, values) }.toSet() enumsString.split(',').filterNot { it.isBlank() }.map { mapToEnum(it, values) }.toSet()
@JvmName("mapIntNullable") @JvmName("mapIntNullable")
@JsName("mapIntNullable") @JsName("mapIntNullable")