From 2eab707cc0ccce93aeefbfafd8d0f3421d7ae6f7 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Thu, 11 Jan 2018 11:24:14 -0500 Subject: [PATCH] Change str conversion to text_type. --- lms/djangoapps/course_goals/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/course_goals/api.py b/lms/djangoapps/course_goals/api.py index 3d05885f52..f1a65c0e2b 100644 --- a/lms/djangoapps/course_goals/api.py +++ b/lms/djangoapps/course_goals/api.py @@ -2,6 +2,7 @@ Course Goals Python API """ import models +from six import text_type from opaque_keys.edx.keys import CourseKey from django.conf import settings @@ -22,7 +23,7 @@ def add_course_goal(user, course_id, goal_key): goal_key (string): The goal key for the new goal. """ - course_key = CourseKey.from_string(str(course_id)) + course_key = CourseKey.from_string(text_type(course_id)) current_goal = get_course_goal(user, course_key) if current_goal: # If a course goal already exists, simply update it.