From f90c442ad6a384ccbe2aa1c128fa6446b0f86352 Mon Sep 17 00:00:00 2001 From: Muhammad Adeel Tajamul <77053848+muhammadadeeltajamul@users.noreply.github.com> Date: Tue, 22 Apr 2025 12:45:26 +0500 Subject: [PATCH] fix: unpin thread api calling returning 500 error (#36567) --- .../djangoapps/django_comment_common/comment_client/thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/thread.py b/openedx/core/djangoapps/django_comment_common/comment_client/thread.py index b5f227f7cc..e5739515f9 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/thread.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/thread.py @@ -266,7 +266,7 @@ class Thread(models.Model): ) self._update_from_response(response) - def un_pin(self, user, thread_id, course_id): + def un_pin(self, user, thread_id, course_id=None): course_key = utils.get_course_key(self.attributes.get("course_id") or course_id) if is_forum_v2_enabled(course_key): response = forum_api.unpin_thread(