Pull request #342: RED-3758: Update processed date only for approved manual redactions without processedDate

Merge in RED/persistence-service from bugfix/RED-3758 to master

* commit 'd56d409a39fbff7c210c4a79d256559e4417e815':
  RED-3758: Update processed date only for approved manual redactions without processedDate
This commit is contained in:
Philipp Schramm 2022-04-06 16:12:44 +02:00 committed by Dominique Eiflaender
commit c7921ff1e2

View File

@ -627,28 +627,28 @@ public class ManualRedactionService {
if (manualRedactions.getEntriesToAdd() != null) {
manualRedactions.getEntriesToAdd().forEach(e -> {
if (e.getStatus().equals(AnnotationStatus.APPROVED)) {
if (e.getStatus().equals(AnnotationStatus.APPROVED) && e.getProcessedDate() == null) {
addRedactionPersistenceService.markAsProcessed(e);
}
});
}
if (manualRedactions.getIdsToRemove() != null) {
manualRedactions.getIdsToRemove().forEach(e -> {
if (e.getStatus().equals(AnnotationStatus.APPROVED)) {
if (e.getStatus().equals(AnnotationStatus.APPROVED) && e.getProcessedDate() == null) {
removeRedactionPersistenceService.markAsProcessed(e);
}
});
}
if (manualRedactions.getForceRedactions() != null) {
manualRedactions.getForceRedactions().forEach(e -> {
if (e.getStatus().equals(AnnotationStatus.APPROVED)) {
if (e.getStatus().equals(AnnotationStatus.APPROVED) && e.getProcessedDate() == null) {
forceRedactionPersistenceService.markAsProcessed(e);
}
});
}
if (manualRedactions.getImageRecategorization() != null) {
manualRedactions.getImageRecategorization().forEach(e -> {
if (e.getStatus().equals(AnnotationStatus.APPROVED)) {
if (e.getStatus().equals(AnnotationStatus.APPROVED) && e.getProcessedDate() == null) {
recategorizationPersistenceService.markAsProcessed(e);
}
});