Fix Convertor Crash (with "existing entries in database that doesn't exist as enum new keys")
This commit is contained in:
parent
dec7232d42
commit
666e0a34aa
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ class Converters {
|
||||||
fun fromAction(action: UserEntry.Action?) = action?.name
|
fun fromAction(action: UserEntry.Action?) = action?.name
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun toAction(action: String?) = action?.let { UserEntry.Action.valueOf(it) }
|
fun toAction(action: String?) = action?.let { UserEntry.Action.fromString(it) }
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun fromBolusType(bolusType: Bolus.Type?) = bolusType?.name
|
fun fromBolusType(bolusType: Bolus.Type?) = bolusType?.name
|
||||||
|
|
Loading…
Reference in a new issue