Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frontend/courses] registration to an already registered course makes the app crash #1018

Open
anthonygego opened this issue Aug 27, 2024 · 0 comments

Comments

@anthonygego
Copy link
Member

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 :

if self.user_manager.course_is_user_registered(course, username) or not course.is_registration_possible(user_info):
return redirect(self.app.get_homepath() + "/course/" + course.get_id())

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:

  1. Copy the course registration link : /register/<course_id>
  2. Register to the course.
  3. Access the registration link once registered.

Expected behavior
The initial redirection or any other feedback message.

Reported by: @Donaschmi

@anthonygego anthonygego added Bug Triage needed Project maintainers still have to review this issue Good First Issue and removed Triage needed Project maintainers still have to review this issue labels Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant