Skip to content

Commit

Permalink
Merge pull request #136 from ccims/bugfix/invalid_deletes
Browse files Browse the repository at this point in the history
Bugfix/invalid deletes
  • Loading branch information
nk-coding authored Sep 25, 2024
2 parents 788bc17 + 4edf0ba commit 5bdda5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class IntraComponentDependencySpecificationService(
)
}
}
intraComponentDependencyParticipantRepository.deleteAll(participantsToRemove)
intraComponentDependencyParticipantRepository.deleteAll(participantsToRemove).awaitSingleOrNull()
if (participants.isEmpty()) {
throw IllegalArgumentException("$propertyName must not be empty")
}
Expand Down Expand Up @@ -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()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ abstract class TrackableService<T : Trackable, R : GropiusRepository<T, String>>
node.syncsTo().forEach {
imsProjectService.deleteIMSProject(it)
}
nodeRepository.deleteAll(labelsToDelete + imsProjectsToDelete + issuesToDelete + node.artefacts() + node)
nodeRepository.deleteAll(labelsToDelete + imsProjectsToDelete + issuesToDelete + node.artefacts())
.awaitSingleOrNull()
}

Expand Down

0 comments on commit 5bdda5b

Please sign in to comment.