Skip to content

Commit

Permalink
Merge branch 'master' into xvello/removesha
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello authored Apr 26, 2024
2 parents 468a9c7 + 5963254 commit 3840c9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions posthog/settings/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@
if not DEBUG and not TEST and SECRET_KEY == DEFAULT_SECRET_KEY:
logger.critical(
"""
You are using the default SECRET_KEY in a production environment!
For the safety of your instance, you must generate and set a unique key.,
More information on
https://posthog.com/docs/self-host/configure/securing-posthog,
"""
You are using the default SECRET_KEY in a production environment!
For the safety of your instance, you must generate and set a unique key.
"""
)
sys.exit("[ERROR] Default SECRET_KEY in production. Stopping Django server…\n")

Expand Down
2 changes: 1 addition & 1 deletion posthog/settings/overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
if runner:
cmd = sys.argv[1] if len(sys.argv) >= 2 else None

if cmd == "test" or runner.endswith("pytest") or runner.endswith("mypy"):
if cmd == "test" or runner.endswith("pytest") or runner.endswith("mypy") or "/mypy/" in runner:
print("Running in test mode. Setting DEBUG and TEST environment variables.")
os.environ["DEBUG"] = "1"
os.environ["TEST"] = "1"

0 comments on commit 3840c9b

Please sign in to comment.