Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
priscilawebdev committed Jan 22, 2025
1 parent 4adcab5 commit 3ba1180
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/sentry/web/client_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,17 +407,12 @@ def should_preload_data(self) -> bool:
# which could cause an error notification (403) to pop up in the user interface.
if self.user and self.request and self.request.path.startswith("accept/"):

request = self.request
http_request: HttpRequest = (
self.request if isinstance(request, HttpRequest) else request._request
)

member_id = http_request.path.split("/")[1]
invite_state = get_invite_state(int(member_id), None, int(self.user.id), http_request)
member_id = self.request.path.split("/")[1]
invite_state = get_invite_state(int(member_id), None, int(self.user.id), self.request)
invitation_link = getattr(invite_state, "invitation_link", None)
accept_path = urllib.parse.urlparse(invitation_link).path

if accept_path == request.path:
if accept_path == self.request.path:
return False

return True
Expand Down

0 comments on commit 3ba1180

Please sign in to comment.