Skip to content

Added option to specify group types for nollning events - #551

Merged
hannesblaman merged 14 commits into
mainfrom
event-specify-group-type
Aug 1, 2026
Merged

Added option to specify group types for nollning events#551
hannesblaman merged 14 commits into
mainfrom
event-specify-group-type

Conversation

@hannesblaman

@hannesblaman hannesblaman commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Added two options for nollning events (will need database migration):

  • mentor_group_types: List specifying which types of group are allowed for an event (mentor, mission, committee and/or default)
  • allow_other_mentors: Not sure if this is strictly needed, but thought it could be useful for events like nollegasque.

Added validation when sending signup request (including signup edit) and new endpoints for getting relevant information for when a user signs up.

Also fixed a bug where the lottery option was not part of EventCreate schema.

Corresponding PRs have been made in frontend and app repos:

@georgelgeback georgelgeback left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read the comment. I fixed some bugs I managed to find which didn't require any judgement calls, and added unit tests because I like them.

I was in the room when a previous spindelman decided not to give admins the ability to change the lottery field after an event has been created, but I'm not sure why this was. Did some searching and found no reasons in the backend nor frontend so I think it's fine to add it. Just in case I added an extra guard so it cannot be edited after spots have been confirmed (it doesn't make sense to switch to/from lottery then anyway).

Also have a look at the new unit tests I created. test_events is unrelated to these changes (but I felt it was important to have them), but test_event_signup includes some judgement calls so you might just want to have a look over what the tests do and edit them if they are not testing for the correct things. Apologies for making the PR 4x as large in LOC.

Other than that, LGTM 👍

Comment thread helpers/user_util.py Outdated
@hannesblaman

Copy link
Copy Markdown
Contributor Author

Deleted user_util.py. Please approve again 😃

@georgelgeback georgelgeback left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice! Squash and merge whenever you want.

@hannesblaman
hannesblaman merged commit ab2b4b6 into main Aug 1, 2026
1 check passed
hannesblaman added a commit that referenced this pull request Aug 5, 2026
* add required columns for mentor group type validation

* Add group type validation on event signup

* Add allow other mentors option

* Fixed lottery not in event update schema

* Also check group allowed on update signup

* Added endpoint for getting user data needed for event signup

* 403 for event invalid group

* Teeny tiny function name change

* Fix unrelated route with no permission gate

* Guard against changing lottery after signups have been confirmed

* Move group check before updating signup, fix bug if group_name ended up as None, allow admins to edit to whatever group they want

* Added unit tests of events as a sidetrack task. We (I) want unit tests to cover everything important.

* Add unit tests for event signups, checking so that some bugs don't return

* Delete helpers/user_util.py

---------

Co-authored-by: georgelgeback <georgelgeback@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants