[Cleaning] normalise missing Result.country

This commit is contained in:
Claudio Atzori 2021-01-26 09:41:44 +01:00
parent 4eb9ed35b1
commit 2890511613
1 changed files with 10 additions and 0 deletions

View File

@ -110,6 +110,16 @@ public class CleaningFunctions {
.setLanguage(
qualifier("und", "Undetermined", ModelConstants.DNET_LANGUAGES));
}
if (Objects.nonNull(r.getCountry())) {
r
.setCountry(
r
.getCountry()
.stream()
.filter(Objects::nonNull)
.filter(c -> StringUtils.isNotBlank(c.getClassid()))
.collect(Collectors.toList()));
}
if (Objects.nonNull(r.getSubject())) {
r
.setSubject(