Fix entityMerger that was excluding the authors of the first entity in the list to merge

This commit is contained in:
Giambattista Bloisi 2023-07-21 00:46:54 +02:00
parent 0210a14e43
commit 5e15f20e6e
1 changed files with 4 additions and 0 deletions

View File

@ -110,6 +110,10 @@ public class DedupRecordFactory {
// set authors and date
if (ModelSupport.isSubClass(entity, Result.class)) {
Optional
.ofNullable(((Result) entity).getAuthor())
.ifPresent(a -> authors.add(a));
((Result) entity).setAuthor(AuthorMerger.merge(authors));
}