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 7a88b9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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) from 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 @@ -82,21 +82,15 @@ def perform_request(method, url, data_or_params=None, raw=False,
log.info(
"""
======> FORUM <======
method: {method}
url: {url}
params: {params}
data: {data}
response: {response}
======> END <======
""".format(
method=method,
url=url,
params=params,
data=data,
response=response_to_log_and_compare,
)
""".format(method=method, url=url, params=params, data=data, response=response_to_log_and_compare)
)

if method == "get":
Expand Down

0 comments on commit 7a88b9e

Please sign in to comment.