diff --git a/lms/djangoapps/django_comment_client/base/views.py b/lms/djangoapps/django_comment_client/base/views.py index f08c302bdb..6734625a76 100644 --- a/lms/djangoapps/django_comment_client/base/views.py +++ b/lms/djangoapps/django_comment_client/base/views.py @@ -295,13 +295,13 @@ def undo_vote_for_thread(request, course_id, thread_id): def pin_thread(request, course_id, thread_id): user = cc.User.from_django_user(request.user) thread = cc.Thread.find(thread_id) - thread.pin(user,thread) + thread.pin(user,thread_id) return JsonResponse(utils.safe_content(thread.to_dict())) def un_pin_thread(request, course_id, thread_id): user = cc.User.from_django_user(request.user) thread = cc.Thread.find(thread_id) - thread.un_pin(user,thread) + thread.un_pin(user,thread_id) return JsonResponse(utils.safe_content(thread.to_dict())) diff --git a/lms/lib/comment_client/thread.py b/lms/lib/comment_client/thread.py index 9fe1b4397f..ccf11f7b1b 100644 --- a/lms/lib/comment_client/thread.py +++ b/lms/lib/comment_client/thread.py @@ -84,6 +84,8 @@ class Thread(models.Model): url = _url_for_pin_thread(thread_id) params = {'user_id': user.id} request = perform_request('put', url, params) + print "\n\n\n\n\n\n*******************" + print request self.update_attributes(request) def un_pin(self, user, thread_id):