Skip to content

Commit

Permalink
fix(CM): Admin can't launch CM for other teachers' runs (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokiterashima authored Nov 19, 2024
1 parent 956edd3 commit 51cac64
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,9 @@ private Workgroup getWorkgroup(Run run) {
User user = userService.retrieveUser(userDetails);
List<Workgroup> workgroupListByRunAndUser = workgroupService.getWorkgroupListByRunAndUser(run,
user);
workgroup = workgroupListByRunAndUser.get(0);
if (workgroupListByRunAndUser.size() > 0) {
workgroup = workgroupListByRunAndUser.get(0);
}
}
return workgroup;
}
Expand Down

0 comments on commit 51cac64

Please sign in to comment.