fix tests
This commit is contained in:
parent
2326be8c7a
commit
da76506e01
1 changed files with 3 additions and 2 deletions
|
@ -82,8 +82,9 @@ internal fun RemoteTreatment.toTreatment(): NSTreatment? {
|
|||
if (treatmentTimestamp == 0L) return null
|
||||
|
||||
this.duration ?: return null
|
||||
val durationInMilliseconds = this.durationInMilliseconds ?: TimeUnit.MINUTES.toMillis(this.duration)
|
||||
|
||||
if (duration == 0L)
|
||||
if (durationInMilliseconds == 0L)
|
||||
return NSTemporaryTarget(
|
||||
date = treatmentTimestamp,
|
||||
device = this.device,
|
||||
|
@ -127,7 +128,7 @@ internal fun RemoteTreatment.toTreatment(): NSTreatment? {
|
|||
endId = this.endId,
|
||||
pumpType = this.pumpType,
|
||||
pumpSerial = this.pumpSerial,
|
||||
duration = this.durationInMilliseconds ?: TimeUnit.MINUTES.toMillis(this.duration),
|
||||
duration = durationInMilliseconds,
|
||||
targetBottom = this.targetBottom,
|
||||
targetTop = this.targetTop,
|
||||
reason = NSTemporaryTarget.Reason.fromString(this.reason)
|
||||
|
|
Loading…
Reference in a new issue