Skip to content

Commit

Permalink
fix: Add missing react_context to more places
Browse files Browse the repository at this point in the history
Follow up to #82518. This keeps giving. We should switch this to a context but it has its own challenges.
  • Loading branch information
BYK committed Jan 22, 2025
1 parent da017ea commit 865f9ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/sentry/integrations/messaging/linkage.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from sentry.users.services.user.serial import serialize_generic_user
from sentry.utils import metrics
from sentry.utils.signing import unsign
from sentry.web.client_config import get_client_config
from sentry.web.frontend.base import BaseView, control_silo_view, region_silo_view
from sentry.web.helpers import render_to_response

Expand Down Expand Up @@ -642,6 +643,7 @@ def execute(
"team": team,
"channel_name": channel_name,
"provider": integration.get_provider(),
"react_config": get_client_config(request, self.active_organization),
},
)

Expand Down Expand Up @@ -673,5 +675,6 @@ def execute(
"body_text": SUCCESS_UNLINKED_TEAM_MESSAGE.format(team=team.slug),
"channel_id": channel_id,
"team_id": integration.external_id,
"react_config": get_client_config(request, self.active_organization),
},
)
7 changes: 6 additions & 1 deletion src/sentry/web/frontend/setup_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
hash_token,
)
from sentry.utils.urls import add_params_to_url
from sentry.web.client_config import get_client_config
from sentry.web.frontend.base import BaseView, control_silo_view
from sentry.web.helpers import render_to_response

Expand Down Expand Up @@ -64,7 +65,11 @@ def get(self, request: HttpRequest, wizard_hash) -> HttpResponseBase:
This opens a page where with an active session fill stuff into the cache
Redirects to organization whenever cache has been deleted
"""
context = {"hash": wizard_hash, "enableProjectSelection": False}
context = {
"hash": wizard_hash,
"enableProjectSelection": False,
"react_config": get_client_config(request, self.active_organization),
}
cache_key = f"{SETUP_WIZARD_CACHE_KEY}{wizard_hash}"

org_slug = request.GET.get("org_slug")
Expand Down

0 comments on commit 865f9ef

Please sign in to comment.