puzzlehunt_server
puzzlehunt_server copied to clipboard
Fix up some small edge cases
There are currently a few small edge cases that come up rarely but should be properly dealt with to avoid 500 errors whenever possible. They are gathered here to avoid creating 5 small issues that will be resolved hopefully quickly.
- [ ] Create try/except wrapper or check to deal with the cases where there is a user with no associated person object. This usually happens when a staff member manually creates or edits a user and forgets to create or edit the person object.
- [ ] Fix what happens when a staff member who is not on a team tries to submit an answer. Currently we 500 error, but we should do something nicer like 400, use the dummy account, or prompt the staff member to create a team. This only applies to staff as the checks for a normal user forbid the user from viewing the puzzle page without a team.
- [ ] Currently refreshing the registration page after leaving a team fails because it submits the post request again (I think?) and it tries to take the user off a team they aren't on. This should either just quietly fail in the background (because it doesn't matter) or I should figure out how to avoid the whole re-POST thing.
- [ ] Don't allow teams to be created after the hunt ends. Its just confusing and useless.
- [ ] Don't allow submissions to be created after a puzzle has been solved. The text box automatically goes away for the user who entered the submission, but it takes till the next ajax request (up to 2 minutes due to exponential backoff) for other team members. Simply respond with some message like "You have already solved this puzzle"