Skip to content

Commit

Permalink
fix: Fix delete of transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Nov 22, 2024
1 parent b3d8658 commit cb3b726
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import io.realm.kotlin.query.RealmResults
import io.realm.kotlin.query.RealmSingleQuery
import io.realm.kotlin.query.Sort
import io.realm.kotlin.query.TRUE_PREDICATE
import io.realm.kotlin.types.RealmUUID
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.mapLatest
Expand Down Expand Up @@ -99,8 +98,8 @@ class TransferController(private val realmProvider: RealmProvider) {
@Throws(RealmException::class, CancellationException::class)
suspend fun deleteTransfer(transferUUID: String) = runThrowingRealm {
realm.write {
val transferToDelete = getTransferQuery(realm, transferUUID)
delete(transferToDelete)
val transferToDelete = query<TransferDB>("${TransferDB::linkUUID.name} == '$transferUUID'").first()
this.delete(transferToDelete)
}
}

Expand Down

0 comments on commit cb3b726

Please sign in to comment.