Work that has already been maxed will not show up in the dropdown

This commit is contained in:
2025-10-07 20:42:41 +02:00
parent 4a470ae09e
commit 1d29e954b8
3 changed files with 39 additions and 11 deletions

View File

@@ -164,6 +164,7 @@ async def add_team_registration(request: Request, event_id: int, session: Sessio
statement = select(TeamRegistration).where(
TeamRegistration.person_name == person, TeamRegistration.work_type == work_type
)
# if the person has already registered for the same work type, just ignore
if session.exec(statement).one_or_none() is None:
registration = TeamRegistration(
person_name=person,