hotfix: filter entities with empty value in redactionLog and entityLog

This commit is contained in:
Kilian Schuettler 2023-11-30 13:16:11 +01:00
parent 8512740238
commit 93a0838e73

View File

@ -44,8 +44,6 @@ 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);