Skip to content

Commit

Permalink
fix server style
Browse files Browse the repository at this point in the history
  • Loading branch information
BBesrour committed Dec 14, 2024
1 parent 11e73f5 commit c6c727d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public class ProgrammingMessagingService {
private final ParticipationRepository participationRepository;

public ProgrammingMessagingService(GroupNotificationService groupNotificationService, WebsocketMessagingService websocketMessagingService,
ResultWebsocketService resultWebsocketService, Optional<LtiNewResultService> ltiNewResultService, TeamRepository teamRepository,
Optional<PyrisEventService> pyrisEventService, ParticipationRepository participationRepository) {
ResultWebsocketService resultWebsocketService, Optional<LtiNewResultService> ltiNewResultService, TeamRepository teamRepository,
Optional<PyrisEventService> pyrisEventService, ParticipationRepository participationRepository) {
this.groupNotificationService = groupNotificationService;
this.websocketMessagingService = websocketMessagingService;
this.resultWebsocketService = resultWebsocketService;
Expand Down Expand Up @@ -229,7 +229,7 @@ public void notifyUserAboutSubmissionProcessing(SubmissionProcessingDTO submissi
Participation participation = participationRepository.findWithProgrammingExerciseWithBuildConfigById(participationId).orElseThrow();
if (participation instanceof StudentParticipation studentParticipation) {
if (studentParticipation.getParticipant() instanceof Team team) {
// eager load the team with students so their information can be used for the messages below
// Eagerly load the team with students so their information can be used for the messages below
studentParticipation.setParticipant(teamRepository.findWithStudentsByIdElseThrow(team.getId()));
}
studentParticipation.getStudents().forEach(user -> websocketMessagingService.sendMessageToUser(user.getLogin(), SUBMISSION_PROCESSING_TOPIC, submission));
Expand Down

0 comments on commit c6c727d

Please sign in to comment.