diff --git a/core/interfaces/src/main/java/info/nightscout/interfaces/ApsMode.kt b/core/interfaces/src/main/java/info/nightscout/interfaces/ApsMode.kt index c6f8106b6f..c6d4b1fbd8 100644 --- a/core/interfaces/src/main/java/info/nightscout/interfaces/ApsMode.kt +++ b/core/interfaces/src/main/java/info/nightscout/interfaces/ApsMode.kt @@ -8,6 +8,6 @@ enum class ApsMode() { companion object { - fun fromString(stringValue: String?) = values().firstOrNull { it.name == (stringValue?.uppercase() ?: UNDEFINED) } + fun fromString(stringValue: String?) = values().firstOrNull { it.name == (stringValue?.uppercase() ?: UNDEFINED.name) } ?: UNDEFINED } }