update duration requirement
This commit is contained in:
parent
763c0bb766
commit
82cce81d0b
2 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,6 @@ data class TemporaryBasal(
|
|||
) : TraceableDBEntry, DBEntryWithTimeAndDuration {
|
||||
|
||||
init {
|
||||
if (duration <= 0)
|
||||
require(duration > 0)
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ var DBEntryWithTimeAndDuration.end
|
|||
get() = timestamp + duration
|
||||
set(value) {
|
||||
duration = value - timestamp
|
||||
require(duration > 0)
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
|
|
Loading…
Reference in a new issue