Skip to content

Commit

Permalink
fix for LEFT-BOOK-CLUB-8 and LEFT-BOOK-CLUB-9
Browse files Browse the repository at this point in the history
  • Loading branch information
janbaykara committed May 5, 2022
1 parent f23a4a4 commit db19c82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def ready(self):
# Implicitly connect a signal handlers decorated with @receiver.
from . import signals

if settings.POSTHOG_PUBLIC_TOKEN:
posthog.api_key = settings.POSTHOG_PUBLIC_TOKEN
if settings.POSTHOG_PUBLIC_TOKEN is not None:
posthog.project_api_key = settings.POSTHOG_PUBLIC_TOKEN
posthog.host = settings.POSTHOG_URL
if settings.DEBUG:
if settings.POSTHOG_PUBLIC_TOKEN is None or settings.DEBUG:
posthog.disabled = True
2 changes: 1 addition & 1 deletion app/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,5 +310,5 @@
MJML_EXEC_CMD = "node_modules/.bin/mjml"

# Posthog
POSTHOG_PUBLIC_TOKEN = os.getenv("POSTHOG_PUBLIC_TOKEN")
POSTHOG_PUBLIC_TOKEN = os.getenv("POSTHOG_PUBLIC_TOKEN", None)
POSTHOG_URL = "https://app.posthog.com"

0 comments on commit db19c82

Please sign in to comment.