Skip to content

Commit

Permalink
finishing touches
Browse files Browse the repository at this point in the history
  • Loading branch information
SamDudley committed Oct 3, 2024
1 parent 270ef25 commit 4a32a98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
6 changes: 3 additions & 3 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,12 @@ def FILTERS_VERBOSE_LOOKUPS():

# Sentry
# https://docs.sentry.io/platforms/python/guides/django/
SENTRY_ENVIRONMENT = env("SENTRY_ENVIRONMENT", None)
SENTRY_DSN = env("SENTRY_DSN", None)
SENTRY_ENVIRONMENT = env.str("SENTRY_ENVIRONMENT", None)
SENTRY_DSN = env.str("SENTRY_DSN", None)

# Configure sentry if a DSN is set
if SENTRY_DSN:
# AWS Prefix needs to be removed once migration is complete
# TODO: AWS Prefix needs to be removed once migration is complete.
sentry_environment = (
f"aws-{SENTRY_ENVIRONMENT}" if is_copilot() else SENTRY_ENVIRONMENT
)
Expand Down
6 changes: 0 additions & 6 deletions config/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
# Set async file uploading
ASYNC_FILE_UPLOAD = True

sentry_sdk.init(
os.environ.get("SENTRY_DSN"),
environment=os.environ.get("SENTR Y_ENVIRONMENT"),
integrations=[DjangoIntegration()],
)

# HSTS (https://man.uktrade.io/docs/procedures/1st-go-live.html)
SECURE_HSTS_SECONDS = 3600
SECURE_HSTS_PRELOAD = True
Expand Down
6 changes: 0 additions & 6 deletions config/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
# Set async file uploading
ASYNC_FILE_UPLOAD = True

sentry_sdk.init(
os.environ.get("SENTRY_DSN"),
environment=os.environ.get("SENTRY_ENVIRONMENT"),
integrations=[DjangoIntegration()],
)

# Django staff SSO user migration process requries the following
MIGRATE_EMAIL_USER_ON_LOGIN = True

Expand Down

0 comments on commit 4a32a98

Please sign in to comment.