Merge pull request #1994 from Philoul/Fix/FixNPE_Autotune
Fix NPE AutotuneIob
This commit is contained in:
commit
764794bdaa
1 changed files with 5 additions and 3 deletions
|
@ -381,9 +381,11 @@ open class AutotuneIob @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TherapyEvent.Type.COMBO_BOLUS ->
|
TherapyEvent.Type.COMBO_BOLUS ->
|
||||||
extendedBolus?.let {
|
extendedBolus?.let { ebr ->
|
||||||
val profile = profileFunction.getProfile(it.timestamp)
|
val profile = profileFunction.getProfile(ebr.timestamp)
|
||||||
it.toJson(true, profile!!, dateUtil)
|
profile?.let {
|
||||||
|
ebr.toJson(true, it, dateUtil)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
TherapyEvent.Type.CORRECTION_BOLUS -> bolusTreatment?.toJson(true, dateUtil)
|
TherapyEvent.Type.CORRECTION_BOLUS -> bolusTreatment?.toJson(true, dateUtil)
|
||||||
TherapyEvent.Type.CARBS_CORRECTION -> carbsTreatment?.toJson(true, dateUtil)
|
TherapyEvent.Type.CARBS_CORRECTION -> carbsTreatment?.toJson(true, dateUtil)
|
||||||
|
|
Loading…
Reference in a new issue