Skip to content

Commit

Permalink
bugfix: null on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
nk-coding committed Sep 9, 2024
1 parent 18f1071 commit 54825a6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import gropius.service.NodeBatchUpdateContext
import gropius.service.common.NamedNodeService
import io.github.graphglue.authorization.Permission
import kotlinx.coroutines.reactor.awaitSingle
import kotlinx.coroutines.reactor.awaitSingleOrNull
import org.springframework.stereotype.Service

/**
Expand Down Expand Up @@ -99,7 +100,7 @@ class ViewService(
val view = repository.findById(input.id)
checkManageViewsPermission(view.project().value, authorizationContext)
nodeRepository.deleteAll(view.relationLayouts() + view.relationLayouts()).awaitSingle()
repository.delete(view).awaitSingle()
repository.delete(view).awaitSingleOrNull()
}

/**
Expand Down

0 comments on commit 54825a6

Please sign in to comment.