diff --git a/src/main/java/org/olat/course/groupsandrights/PersistingCourseGroupManager.java b/src/main/java/org/olat/course/groupsandrights/PersistingCourseGroupManager.java index c568f181b047e753ce0fd47851723c2feaf1d7a4..dcef2d4fe96b789aa892a1355f7cd8377beec788 100644 --- a/src/main/java/org/olat/course/groupsandrights/PersistingCourseGroupManager.java +++ b/src/main/java/org/olat/course/groupsandrights/PersistingCourseGroupManager.java @@ -242,6 +242,8 @@ public class PersistingCourseGroupManager extends BasicManager implements Course */ @Override public List<BusinessGroup> getOwnedBusinessGroups(Identity identity) { + if(identity == null) return new ArrayList<>(); + SearchBusinessGroupParams params = new SearchBusinessGroupParams(identity, true, false); List<BusinessGroup> allGroups = businessGroupService.findBusinessGroups(params, getCourseEntry(), 0, -1); @@ -253,6 +255,8 @@ public class PersistingCourseGroupManager extends BasicManager implements Course */ @Override public List<BusinessGroup> getParticipatingBusinessGroups(Identity identity) { + if(identity == null) return new ArrayList<>(); + SearchBusinessGroupParams params = new SearchBusinessGroupParams(identity, false, true); List<BusinessGroup> allGroups = businessGroupService.findBusinessGroups(params, getCourseEntry(), 0, -1);