From 07ff4884f15557f359de75cc4e900969abe2f63a Mon Sep 17 00:00:00 2001 From: nk-coding Date: Wed, 25 Sep 2024 07:34:43 +0200 Subject: [PATCH] fix more invalid deletes --- .../IntraComponentDependencySpecificationService.kt | 4 ++-- .../kotlin/gropius/service/architecture/ProjectService.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/kotlin/gropius/service/architecture/IntraComponentDependencySpecificationService.kt b/core/src/main/kotlin/gropius/service/architecture/IntraComponentDependencySpecificationService.kt index 1e84d80f..e35f229b 100644 --- a/core/src/main/kotlin/gropius/service/architecture/IntraComponentDependencySpecificationService.kt +++ b/core/src/main/kotlin/gropius/service/architecture/IntraComponentDependencySpecificationService.kt @@ -143,7 +143,7 @@ class IntraComponentDependencySpecificationService( ) } } - intraComponentDependencyParticipantRepository.deleteAll(participantsToRemove) + intraComponentDependencyParticipantRepository.deleteAll(participantsToRemove).awaitSingleOrNull() if (participants.isEmpty()) { throw IllegalArgumentException("$propertyName must not be empty") } @@ -194,7 +194,7 @@ class IntraComponentDependencySpecificationService( val allParticipants = intraComponentDependencySpecification.let { it.outgoingParticipants() + it.incomingParticipants() } - intraComponentDependencyParticipantRepository.deleteAll(allParticipants) + intraComponentDependencyParticipantRepository.deleteAll(allParticipants).awaitSingleOrNull() repository.delete(intraComponentDependencySpecification).awaitSingleOrNull() } diff --git a/core/src/main/kotlin/gropius/service/architecture/ProjectService.kt b/core/src/main/kotlin/gropius/service/architecture/ProjectService.kt index b60aebdf..fe4c6290 100644 --- a/core/src/main/kotlin/gropius/service/architecture/ProjectService.kt +++ b/core/src/main/kotlin/gropius/service/architecture/ProjectService.kt @@ -107,7 +107,7 @@ class ProjectService( project, Permission(NodePermission.ADMIN, authorizationContext), "delete the Project" ) beforeDeleteTrackable(project) - nodeRepository.deleteAll(project.relationLayouts() + project.relationLayouts()).awaitSingle() + nodeRepository.deleteAll(project.relationLayouts() + project.relationLayouts()).awaitSingleOrNull() repository.delete(project).awaitSingleOrNull() }