From e12120befe37a4eb723e6a3920e4b640dbf646d7 Mon Sep 17 00:00:00 2001 From: Awais Jibran <awaisdar001@gmail.com> Date: Wed, 4 Apr 2018 16:46:29 +0500 Subject: [PATCH] Revert "Logging: Error getting the course from modulestore" --- openedx/core/djangoapps/course_groups/cohorts.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/openedx/core/djangoapps/course_groups/cohorts.py b/openedx/core/djangoapps/course_groups/cohorts.py index d058f743800..9b166c98ce9 100644 --- a/openedx/core/djangoapps/course_groups/cohorts.py +++ b/openedx/core/djangoapps/course_groups/cohorts.py @@ -19,8 +19,6 @@ from eventtracking import tracker from openedx.core.djangoapps.request_cache import clear_cache, get_cache from openedx.core.djangoapps.request_cache.middleware import request_cached from student.models import get_user_by_username_or_email -from xmodule.course_module import CourseDescriptor -from xmodule.error_module import ErrorDescriptor from .models import ( CohortMembership, @@ -290,12 +288,6 @@ def get_random_cohort(course_key): If there are no existing cohorts of type RANDOM in the course, one will be created. """ course = courses.get_course(course_key) - if not isinstance(course, CourseDescriptor): - course_or_error_msg = course.error_msg if isinstance(course, ErrorDescriptor) else unicode(course) - log.error( - "COURSE_LOADING_ERROR: Error while loading course %s from the module store: %s", - unicode(course_key), course_or_error_msg - ) cohorts = get_course_cohorts(course, assignment_type=CourseCohort.RANDOM) if cohorts: cohort = local_random().choice(cohorts) -- GitLab