From b1ffd1aecc57dd66f39b4b6f63c2f16b29b551af Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Tue, 19 Nov 2024 08:34:00 -0800 Subject: [PATCH] fix(CM): Admin can't launch CM for other teachers' runs --- .../presentation/web/controllers/InformationController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/wise/portal/presentation/web/controllers/InformationController.java b/src/main/java/org/wise/portal/presentation/web/controllers/InformationController.java index d60e6f78e..f7e272ee1 100644 --- a/src/main/java/org/wise/portal/presentation/web/controllers/InformationController.java +++ b/src/main/java/org/wise/portal/presentation/web/controllers/InformationController.java @@ -796,7 +796,9 @@ private Workgroup getWorkgroup(Run run) { User user = userService.retrieveUser(userDetails); List workgroupListByRunAndUser = workgroupService.getWorkgroupListByRunAndUser(run, user); - workgroup = workgroupListByRunAndUser.get(0); + if (workgroupListByRunAndUser.size() > 0) { + workgroup = workgroupListByRunAndUser.get(0); + } } return workgroup; }