RED-3886: Do migration stuff also for softdeleted files

This commit is contained in:
deiflaender 2022-04-14 12:51:36 +02:00
parent e8297200f2
commit 4c1fd58d5f
3 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ public class DictionaryToEntityMigration2 extends Migration {
log.info("Start migration of dossier {}", dossier.getId());
files.forEach(file -> {
log.info("Start migration of file {}", file.getId());
if (file.getDeleted() == null) {
if (file.getHardDeletedTime() == null) {
var newRedactionLogEntries = new ArrayList<RedactionLogEntry>();
var redactionLog = fileManagementStorageService.getRedactionLog(dossier.getId(), file.getId());

View File

@ -48,7 +48,7 @@ public class MigrateHighlights3 extends Migration {
dossiers.forEach(dossier -> {
var files = fileStatusPersistenceService.getStatusesForDossier(dossier.getId());
files.forEach(file -> {
if (file.getDeleted() == null) {
if (file.getHardDeletedTime() == null) {
var fileBytes = fileManagementStorageService.getStoredObjectBytes(dossier.getId(), file.getId(), FileType.ORIGIN);
var hasHighlights = pdfTronRedactionClient.extractHighlights(new DocumentRequest(dossier.getId(), file.getId(), fileBytes));

View File

@ -44,7 +44,7 @@ public class RemoveFalsePositiveManualRedactions6 extends Migration {
dossiers.forEach(dossier -> {
var files = fileStatusPersistenceService.getStatusesForDossier(dossier.getId());
files.forEach(file -> {
if (file.getDeleted() == null) {
if (file.getHardDeletedTime() == null) {
var annotationIdsToRemove = new ArrayList<String>();
var manualRedactions = manualRedactionController.getManualRedactions(dossier.getId(), file.getId());