Skip to content

Commit

Permalink
chore: quality checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Faraz Maqsood authored and Muhammad Faraz Maqsood committed Sep 16, 2024
1 parent d14d18a commit 8f9cb7d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from forum import api as forum_api
from forum.utils import ForumV2RequestError


class User(models.Model):

accessible_fields = [
Expand Down Expand Up @@ -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)
self._update_from_response(response)

def retire(self, retired_username):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ def _get_comment_service_url(url):
return url.replace(PREFIX, COMMENTS_SERVICE_PREFIX)


def perform_request(method, url, data_or_params=None, raw=False,
metric_action=None, metric_tags=None, paged_results=False):
def perform_request(
method,
url,
data_or_params=None,
raw=False,
metric_action=None,
metric_tags=None,
paged_results=False,
):
# To avoid dependency conflict
from openedx.core.djangoapps.django_comment_common.models import ForumsConfig
config = ForumsConfig.current()
Expand Down Expand Up @@ -82,7 +89,7 @@ def perform_request(method, url, data_or_params=None, raw=False,
log.info(
"""
======> FORUM <======
method: {method}
url: {url}
params: {params}
Expand Down

0 comments on commit 8f9cb7d

Please sign in to comment.