INGInious
INGInious copied to clipboard
[frontend/courses] registration to an already registered course makes the app crash
trafficstars
Describe the bug If the course registration page is accessed when it is not relevant (no registration possible or user already registered), an Exception is raised.
The issue comes from these lines :
https://github.com/UCL-INGI/INGInious/blob/fcb729ede7d23a44df27bc328591c22bacc860cb/inginious/frontend/pages/course_register.py#L29-L30
as the method should actually returns a tuple. It should date from the web.py to flask migration when redirect were made with raise statement, while flask actually treat them as typical Response objects.
INGInious installation details
- Version v0.8+
To Reproduce Steps to reproduce the behavior:
- Copy the course registration link :
/register/<course_id> - Register to the course.
- Access the registration link once registered.
Expected behavior The initial redirection or any other feedback message.
Reported by: @Donaschmi