Commit 4b1974cd by Gabe Mulley

fix spammy log messages from course_id tracking in CMS

parent ddd9e0e4
...@@ -43,15 +43,17 @@ def course_context_from_course_id(course_id): ...@@ -43,15 +43,17 @@ def course_context_from_course_id(course_id):
'course_id': course_id, 'course_id': course_id,
'org_id': '' 'org_id': ''
} }
try:
location = CourseDescriptor.id_to_location(course_id) if course_id:
context['org_id'] = location.org try:
except ValueError: location = CourseDescriptor.id_to_location(course_id)
log.warning( context['org_id'] = location.org
'Unable to parse course_id "{course_id}"'.format( except ValueError:
course_id=course_id log.warning(
), 'Unable to parse course_id "{course_id}"'.format(
exc_info=True course_id=course_id
) ),
exc_info=True
)
return context return context
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