Hotfix for duplicate entries in redactionLog

This commit is contained in:
deiflaender 2021-11-30 16:27:59 +01:00
parent 459c977f7e
commit 46d14cfc64

View File

@ -54,6 +54,15 @@ public class RedactionLogMergeService {
}
Set<String> processedIds = new HashSet<>();
redactionLog.getRedactionLogEntry().removeIf(entry -> {
if(processedIds.contains(entry.getId())){
log.info("Duplicate annotation found with id {}", entry.getId());
return true;
}
processedIds.add(entry.getId());
return false;
});
return redactionLog;
}