Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 12b41dd

Browse files
author
ge85riz
committed
🚑 hotfix: check if the event is in the past before unseating all participants
1 parent 85232e2 commit 12b41dd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎backend/src/main/java/com/itestra/eep/services/impl/SeatAllocationServiceImpl.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ public Map<UUID, List<UUID>> findEmployeeIdsSittingWithAcquaintances(UUID eventI
7272

7373
@Override
7474
public void unsetAllChairAssignmentsOfEvent(UUID eventId) {
75+
76+
Event event = eventRepository.findById(eventId).orElseThrow(EventNotFoundException::new);
77+
78+
if (event.getDate().isBefore(LocalDateTime.now())) {
79+
throw new ParticipantOfPastEventException();
80+
}
81+
7582
chairRepository.unsetAllEmployeeParticipationChairsByEventId(eventId);
7683
chairRepository.unsetAllVisitorParticipationChairsByEventId(eventId);
7784
}

0 commit comments

Comments
 (0)