Merge pull request #11495 from edx/aj/tnl4115-improve-log-get-course-section

Use Course ID in logging an exception
This commit is contained in:
Awais Jibran
2016-02-16 18:56:50 +05:00

View File

@@ -289,8 +289,8 @@ def get_course_info_section(request, user, course, section_key):
except Exception: # pylint: disable=broad-except
html = render_to_string('courseware/error-message.html', None)
log.exception(
u"Error rendering course=%s, section_key=%s",
course, section_key
u"Error rendering course_id=%s, section_key=%s",
unicode(course.id), section_key
)
return html