Fix delete event on DS soft delete (#2032)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -236,9 +236,12 @@ public class JpaDistributionSetManagement implements DistributionSetManagement {
|
|||||||
|
|
||||||
// soft delete assigned
|
// soft delete assigned
|
||||||
if (!assigned.isEmpty()) {
|
if (!assigned.isEmpty()) {
|
||||||
final Long[] dsIds = assigned.toArray(new Long[0]);
|
distributionSetRepository.saveAll(
|
||||||
distributionSetRepository.deleteDistributionSet(dsIds);
|
setsFound.stream()
|
||||||
targetFilterQueryRepository.unsetAutoAssignDistributionSetAndActionTypeAndAccessContext(dsIds);
|
.filter(set -> assigned.contains(set.getId()))
|
||||||
|
.peek(toSoftDelete -> toSoftDelete.setDeleted(true))
|
||||||
|
.toList());
|
||||||
|
targetFilterQueryRepository.unsetAutoAssignDistributionSetAndActionTypeAndAccessContext(assigned.toArray(new Long[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// mark the rest as hard delete
|
// mark the rest as hard delete
|
||||||
|
|||||||
Reference in New Issue
Block a user