fix: unpin thread api calling returning 500 error (#36567)

This commit is contained in:
Muhammad Adeel Tajamul
2025-04-22 12:45:26 +05:00
committed by GitHub
parent 6972a6a562
commit f90c442ad6

View File

@@ -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(