Nikhil Rao преди 1 година
родител
ревизия
b4bb849388
променени са 2 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 2 0
      reflex/constants/base.py
  2. 1 1
      reflex/utils/telemetry.py

+ 2 - 0
reflex/constants/base.py

@@ -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):

+ 1 - 1
reflex/utils/telemetry.py

@@ -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 = {