Skip to content

fix: set default environment to production only if environment is None #90323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sentry-autofix[bot]
Copy link
Contributor

👋 Hi there! This PR was automatically generated by Autofix 🤖

Fixes SENTRY-3SWF. The issue was that: event_data.get() returned None when the 'environment' key existed with a None value, causing Environment.objects.get(name=None) to fail.

The environment was being defaulted to production even if the environment was an empty string. This change ensures that the environment is only defaulted to production if the environment is None.

If you have any questions or feedback for the Sentry team about this fix, please email autofix@sentry.io with the Run ID: 32163.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 24, 2025
@michellewzhang michellewzhang marked this pull request as ready for review April 24, 2025 19:47
@michellewzhang michellewzhang requested a review from a team as a code owner April 24, 2025 19:47
@michellewzhang michellewzhang requested a review from aliu39 April 24, 2025 19:47
@michellewzhang michellewzhang added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant