From f7795f8a68ac669282c3ed51be822db7ebebd036 Mon Sep 17 00:00:00 2001 From: Giulio Gratta Date: Fri, 19 Jan 2018 15:36:17 -0800 Subject: [PATCH] Updates course about date conditionals - Formatted date start strings can contain unicode, so six.string_types is a better `is_instance` check - "end_date" is no longer a required key in the `get_course_about_section` dictionary, so that check can fail and is bad. --- lms/templates/courseware/course_about.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/templates/courseware/course_about.html b/lms/templates/courseware/course_about.html index e8db9f3637..68aedfe835 100644 --- a/lms/templates/courseware/course_about.html +++ b/lms/templates/courseware/course_about.html @@ -245,7 +245,7 @@ from six import string_types % endif ## We plan to ditch end_date (which is not stored in course metadata), ## but for backwards compatibility, show about/end_date blob if it exists. - % if get_course_about_section(request, course, "end_date") or course.end: + % if course.end: <% course_end_date = course.end %> @@ -253,7 +253,7 @@ from six import string_types
  • ${_("Classes End")}

    - % if isinstance(course_end_date, str): + % if isinstance(course_end_date, string_types): ${course_end_date} % else: <%