hotfix: filter entities with empty value in redactionLog and entityLog

This commit is contained in:
Kilian Schuettler 2023-11-30 13:03:13 +01:00
parent 2d93437812
commit 8512740238
2 changed files with 2 additions and 1 deletions

View File

@ -240,7 +240,6 @@ public class AnalyzeService {
newRedactionLogEntries,
false);
previousRedactionLog.setRedactionLogEntry(previousRedactionLog.getRedactionLogEntry().stream().filter(entity -> !entity.getValue().isEmpty()).collect(Collectors.toList()));
previousRedactionLog.getRedactionLogEntry()
.removeIf(entry -> sectionsToReanalyseIds.contains(entry.getSectionNumber()) && !entry.getType().equals(ImportedRedactionService.IMPORTED_REDACTION_TYPE));

View File

@ -44,6 +44,8 @@ public class RedactionChangeLogService {
return new RedactionLogChanges(currentRedactionLog, false);
}
previousRedactionLog.setRedactionLogEntry(previousRedactionLog.getRedactionLogEntry().stream().filter(entity -> !entity.getValue().isEmpty()).collect(Collectors.toList()));
List<RedactionLogEntry> previouslyExistingEntries = previousRedactionLog.getRedactionLogEntry().stream().filter(entry -> !entry.lastChangeIsRemoved()).toList();
Map<String, RedactionLogEntry> addedEntryIds = getEntriesThatExistInCurrentButNotInPreviousRedactionLog(currentRedactionLog, previouslyExistingEntries);