added check to avoid NPE when checking the organization country

This commit is contained in:
Miriam Baglioni 2023-05-04 19:38:39 +02:00
parent 0704e186f6
commit 99ac5bab46
1 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,8 @@ public class GetDatasourceFromCountry implements Serializable {
Encoders.bean(Organization.class))
.filter(
(FilterFunction<Organization>) o -> !o.getDataInfo().getDeletedbyinference() &&
o.getCountry() != null &&
o.getCountry().getClassid() != null &&
o.getCountry().getClassid().length() > 0 &&
o.getCountry().getClassid().equals(country));