RED-7599 - Always trigger reanalysis when removing manual redaction #118
@ -109,7 +109,6 @@ public class ManualRedactionService {
|
||||
public List<ManualAddResponse> addRemoveRedaction(String dossierId, String fileId, List<RemoveRedactionRequest> removeRedactionRequests) {
|
||||
|
||||
var response = new ArrayList<ManualAddResponse>();
|
||||
var requiresReAnalysis = false;
|
||||
var manualRedactions = manualRedactionProviderService.getManualRedactions(fileId);
|
||||
|
||||
//validate removing from dossier template dictionary
|
||||
@ -123,7 +122,6 @@ public class ManualRedactionService {
|
||||
if (manualAddRedactionsContains(manualRedactions, removeRedactionRequest.getAnnotationId())) {
|
||||
log.info("hard delete ManualRedactions for file {} and annotation {}", fileId, removeRedactionRequest.getAnnotationId());
|
||||
manualRedactionProviderService.hardDeleteManualRedactions(fileId, removeRedactionRequest.getAnnotationId());
|
||||
requiresReAnalysis = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -144,14 +142,10 @@ public class ManualRedactionService {
|
||||
removedFromDictionary,
|
||||
typeIdsOfModifiedDictionaries);
|
||||
|
||||
requiresReAnalysis = requiresReAnalysis || removedFromDictionary;
|
||||
|
||||
response.add(ManualAddResponse.builder().annotationId(removeRedactionRequest.getAnnotationId()).commentId(commentId).build());
|
||||
}
|
||||
|
||||
if (requiresReAnalysis) {
|
||||
reprocess(dossierId, fileId);
|
||||
}
|
||||
reprocess(dossierId, fileId);
|
||||
|
||||
analysisFlagsCalculationService.calculateFlags(dossierId, fileId);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user