I have been noticing an issue in cases where a student tries to enroll in a course with no modules. When this occurs I receive a "list index out of range" error pointing to:
context['module'] = course.modules.all()[0]
I was wondering if there was an elif statement or some other solution to this issue that I missed?
Hello,
I have been noticing an issue in cases where a student tries to enroll in a course with no modules. When this occurs I receive a "list index out of range" error pointing to:
context['module'] = course.modules.all()[0]
I was wondering if there was an elif statement or some other solution to this issue that I missed?
Thank you.