Fix posthog (#1992)

This commit is contained in:
Nikhil Rao 2023-10-18 03:30:09 -07:00 committed by GitHub
parent e15710de17
commit b4bb849388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,8 @@ class Dirs(SimpleNamespace):
WEB_ASSETS = os.path.join(WEB, "public")
# The env json file.
ENV_JSON = os.path.join(WEB, "env.json")
# The reflex json file.
REFLEX_JSON = os.path.join(WEB, "reflex.json")
class Reflex(SimpleNamespace):

View File

@ -90,7 +90,7 @@ def send(event: str, telemetry_enabled: bool | None = None) -> bool:
try:
telemetry = Telemetry()
with open(constants.REFLEX_JSON) as f: # type: ignore
with open(constants.Dirs.REFLEX_JSON) as f:
reflex_json = json.load(f)
distinct_id = reflex_json["project_hash"]
post_hog = {