Fix: Team registrations are now checked for duplicates only for the current event
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user