Fix: Team registrations are now checked for duplicates only for the current event

This commit is contained in:
2025-10-21 10:40:19 +02:00
parent ef82152b95
commit a11f1a6c38

View File

@@ -378,7 +378,9 @@ async def add_team_registration(request: Request, event_id: int, session: Sessio
work_type = form_data["workType"]
statement = select(TeamRegistration).where(
TeamRegistration.person_name == person, TeamRegistration.work_type == work_type
TeamRegistration.person_name == person,
TeamRegistration.work_type == work_type,
TeamRegistration.event_id == event_id,
)
# if the person has already registered for the same work type, just ignore
if session.scalars(statement).one_or_none() is None: