From b7e61875fd8fb6ab203cf9258206e0e2e6336f44 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Mon, 16 Sep 2024 11:53:22 +0500 Subject: [PATCH] chore: quality checks --- .../djangoapps/django_comment_common/comment_client/user.py | 3 ++- .../djangoapps/django_comment_common/comment_client/utils.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/user.py b/openedx/core/djangoapps/django_comment_common/comment_client/user.py index 5a6bb6f2cb6f..469158e2fb73 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/user.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/user.py @@ -6,6 +6,7 @@ from forum import api as forum_api from forum.utils import ForumV2RequestError + class User(models.Model): accessible_fields = [ @@ -152,7 +153,7 @@ def _retrieve(self, *args, **kwargs): try: response = forum_api.retrieve_user(self.attributes["id"], retrieve_params) except ForumV2RequestError as e: - raise str(e) + raise str(e) from e self._update_from_response(response) def retire(self, retired_username): diff --git a/openedx/core/djangoapps/django_comment_common/comment_client/utils.py b/openedx/core/djangoapps/django_comment_common/comment_client/utils.py index 6477267a982d..ea1891d2bce9 100644 --- a/openedx/core/djangoapps/django_comment_common/comment_client/utils.py +++ b/openedx/core/djangoapps/django_comment_common/comment_client/utils.py @@ -82,7 +82,7 @@ def perform_request(method, url, data_or_params=None, raw=False, log.info( """ ======> FORUM <====== - + method: {method} url: {url} params: {params}