Skip to content

Commit

Permalink
Add sentry collectstatic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Aug 2, 2023
1 parent 54605b8 commit 2f91bd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion plexus/settings_production.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
from django.conf import settings
from plexus.settings_shared import * # noqa: F403
from ctlsettings.production import common
Expand All @@ -23,7 +24,7 @@
except ImportError:
pass

if hasattr(settings, 'SENTRY_DSN'):
if ('collectstatic' not in sys.argv) and hasattr(settings, 'SENTRY_DSN'):
sentry_sdk.init(
dsn=SENTRY_DSN, # noqa: F405
integrations=[DjangoIntegration()],
Expand Down
3 changes: 2 additions & 1 deletion plexus/settings_staging.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
from django.conf import settings
from plexus.settings_shared import * # noqa: F403
from ctlsettings.staging import common
Expand All @@ -23,7 +24,7 @@
except ImportError:
pass

if hasattr(settings, 'SENTRY_DSN'):
if ('collectstatic' not in sys.argv) and hasattr(settings, 'SENTRY_DSN'):
sentry_sdk.init(
dsn=SENTRY_DSN, # noqa: F405
integrations=[DjangoIntegration()],
Expand Down

0 comments on commit 2f91bd4

Please sign in to comment.