Add additional null check for Elastic's Dmp Repository
This commit is contained in:
parent
9919886c26
commit
1d48ee81b9
|
@ -174,7 +174,7 @@ public class DmpRepository extends ElasticRepository<Dmp, DmpCriteria> {
|
|||
}
|
||||
|
||||
if (criteria.getCollaborators() != null && criteria.getCollaborators().size() > 0) {
|
||||
boolQuery = boolQuery.should(QueryBuilders.termsQuery(Dmp.MapKey.COLLABORATORS.getName() + ".id.keyword", criteria.getCollaborators().stream().map(UUID::toString).collect(Collectors.toList())));
|
||||
boolQuery = boolQuery.should(QueryBuilders.termsQuery(Dmp.MapKey.COLLABORATORS.getName() + ".id.keyword", criteria.getCollaborators().stream().filter(Objects::nonNull).map(UUID::toString).collect(Collectors.toList())));
|
||||
}
|
||||
|
||||
if (!criteria.isAllowAllVersions()) {
|
||||
|
|
Loading…
Reference in New Issue