From 666e0a34aafc23db1711f8e9203709017e757312 Mon Sep 17 00:00:00 2001 From: Philoul Date: Mon, 22 Feb 2021 14:56:29 +0100 Subject: [PATCH] Fix Convertor Crash (with "existing entries in database that doesn't exist as enum new keys") --- .../main/java/info/nightscout/androidaps/database/Converters.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/src/main/java/info/nightscout/androidaps/database/Converters.kt b/database/src/main/java/info/nightscout/androidaps/database/Converters.kt index 5c054bd8be..29bd3db50c 100644 --- a/database/src/main/java/info/nightscout/androidaps/database/Converters.kt +++ b/database/src/main/java/info/nightscout/androidaps/database/Converters.kt @@ -14,7 +14,7 @@ class Converters { fun fromAction(action: UserEntry.Action?) = action?.name @TypeConverter - fun toAction(action: String?) = action?.let { UserEntry.Action.valueOf(it) } + fun toAction(action: String?) = action?.let { UserEntry.Action.fromString(it) } @TypeConverter fun fromBolusType(bolusType: Bolus.Type?) = bolusType?.name