From 54aced50b76f13e827d18e3475f9d00b15bd1d8a Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Mon, 21 Mar 2016 14:07:29 +0100 Subject: [PATCH] OO-1947: you cannot be in a group if you are null --- .../course/groupsandrights/PersistingCourseGroupManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/olat/course/groupsandrights/PersistingCourseGroupManager.java b/src/main/java/org/olat/course/groupsandrights/PersistingCourseGroupManager.java index c568f181b04..dcef2d4fe96 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); -- GitLab