lint
This commit is contained in:
parent
129869b720
commit
016cf9dada
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ class InsertOrUpdateHeartRateTransaction(private val heartRate: HeartRate):
|
|||
override fun run(): TransactionResult {
|
||||
val existing = if (heartRate.id == 0L) null else database.heartRateDao.findById(heartRate.id)
|
||||
return if (existing == null) {
|
||||
database.heartRateDao.insertNewEntry(heartRate).let { id ->
|
||||
database.heartRateDao.insertNewEntry(heartRate).let {
|
||||
TransactionResult(listOf(heartRate), emptyList()) }
|
||||
} else {
|
||||
database.heartRateDao.updateExistingEntry(heartRate)
|
||||
|
|
Loading…
Reference in a new issue