Fixes bug when fetching the Organisations.

This commit is contained in:
gkolokythas 2019-05-15 09:36:05 +03:00
parent 0ee3299d79
commit 99fc3df7fa
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ public class OrganisationDaoImpl extends DatabaseAccess<Organisation> implements
if (criteria.getLabelLike() != null) { if (criteria.getLabelLike() != null) {
query.where((builder, root) -> builder.like(builder.upper(root.get("label")), "%" + criteria.getLabelLike().toUpperCase() + "%")); query.where((builder, root) -> builder.like(builder.upper(root.get("label")), "%" + criteria.getLabelLike().toUpperCase() + "%"));
} }
if (criteria.getPublic()) { if (criteria.getPublic() != null && criteria.getPublic()) {
query.where((builder, root) -> builder.equal(root.join("dmps", JoinType.LEFT).get("status"), DMP.DMPStatus.FINALISED.getValue())); query.where((builder, root) -> builder.equal(root.join("dmps", JoinType.LEFT).get("status"), DMP.DMPStatus.FINALISED.getValue()));
} }
return query; return query;