MDT: fix import after update
This commit is contained in:
parent
3a29e8d4f2
commit
1f4d958931
1 changed files with 5 additions and 2 deletions
|
@ -66,8 +66,11 @@ class PumpSyncStorage @Inject constructor(
|
||||||
|
|
||||||
if (jsonData.isNotBlank()) {
|
if (jsonData.isNotBlank()) {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
pumpSyncStorageTBR = xstream.fromXML(jsonData, MutableList::class.java) as
|
pumpSyncStorageTBR = try {
|
||||||
MutableList<PumpDbEntryTBR>
|
xstream.fromXML(jsonData, MutableList::class.java) as MutableList<PumpDbEntryTBR>
|
||||||
|
} catch (e: Exception) {
|
||||||
|
mutableListOf()
|
||||||
|
}
|
||||||
|
|
||||||
aapsLogger.debug(LTag.PUMP, "Loading Pump Sync Storage: tbrs=${pumpSyncStorageTBR.size}.")
|
aapsLogger.debug(LTag.PUMP, "Loading Pump Sync Storage: tbrs=${pumpSyncStorageTBR.size}.")
|
||||||
aapsLogger.debug(LTag.PUMP, "DD: PumpSyncStorageTBR=$pumpSyncStorageTBR")
|
aapsLogger.debug(LTag.PUMP, "DD: PumpSyncStorageTBR=$pumpSyncStorageTBR")
|
||||||
|
|
Loading…
Reference in a new issue