Fix discussions by correctly serializing outgoing course_ids

This commit is contained in:
Calen Pennington
2014-05-09 14:51:03 -04:00
parent 558e9c8f20
commit 76a04fa805

View File

@@ -87,7 +87,7 @@ class User(models.Model):
if not self.course_id:
raise CommentClientRequestError("Must provide course_id when retrieving active threads for the user")
url = _url_for_user_active_threads(self.id)
params = {'course_id': self.course_id}
params = {'course_id': self.course_id.to_deprecated_string()}
params = merge_dict(params, query_params)
response = perform_request(
'get',
@@ -103,7 +103,7 @@ class User(models.Model):
if not self.course_id:
raise CommentClientRequestError("Must provide course_id when retrieving subscribed threads for the user")
url = _url_for_user_subscribed_threads(self.id)
params = {'course_id': self.course_id}
params = {'course_id': self.course_id.to_deprecated_string()}
params = merge_dict(params, query_params)
response = perform_request(
'get',
@@ -119,7 +119,7 @@ class User(models.Model):
url = self.url(action='get', params=self.attributes)
retrieve_params = self.default_retrieve_params
if self.attributes.get('course_id'):
retrieve_params['course_id'] = self.course_id
retrieve_params['course_id'] = self.course_id.to_deprecated_string()
try:
response = perform_request(
'get',