Commit 2fe4a23d authored by Matija Obreza's avatar Matija Obreza
Browse files

Fixed lazyload exception with organization.members

parent eb63f330
......@@ -276,10 +276,11 @@ public class GenesysServiceImpl implements GenesysService, TraitService {
@Override
public Page<Accession> listAccessionsByOrganization(Organization organization, Pageable pageable) {
if (organization.getMembers() == null || organization.getMembers().size() == 0) {
List<FaoInstitute> members = organizationRepository.findInstitutesByOrganization(organization);
if (members == null || members.size() == 0) {
return new LucenePage<Accession>(0, 0);
}
return accessionRepository.findByInstitute(organization.getMembers(), pageable);
return accessionRepository.findByInstitute(members, pageable);
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment