Commit 63fc2eec by Chris Dodge

drive by fix to get proper error handling

parent 25ceea17
...@@ -311,7 +311,7 @@ def change_enrollment(request): ...@@ -311,7 +311,7 @@ def change_enrollment(request):
course = course_from_id(course_id) course = course_from_id(course_id)
except ItemNotFoundError: except ItemNotFoundError:
log.warning("User {0} tried to enroll in non-existent course {1}" log.warning("User {0} tried to enroll in non-existent course {1}"
.format(user.username, enrollment.course_id)) .format(user.username, course_id))
return {'success': False, 'error': 'The course requested does not exist.'} return {'success': False, 'error': 'The course requested does not exist.'}
if not has_access(user, course, 'enroll'): if not has_access(user, course, 'enroll'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment