Address review comments

This commit is contained in:
Calen Pennington
2012-07-24 14:46:46 -04:00
parent 66f79251dc
commit 98910a2d49
2 changed files with 5 additions and 1 deletions

View File

@@ -36,7 +36,8 @@ def check_course(course_id, course_must_be_open=True, course_required=True):
except (KeyError, ItemNotFoundError):
raise Http404("Course not found.")
if course_must_be_open and not (course.has_started() or settings.MITX_FEATURES['DISABLE_START_DATES']):
started = course.has_started() or settings.MITX_FEATURES['DISABLE_START_DATES']
if course_must_be_open and not started:
raise Http404("This course has not yet started.")
return course