File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
supertokens_python/recipe/dashboard/api Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,12 @@ async def handle_analytics_post(
57
57
NormalisedURLPath ("/telemetry" )
58
58
)
59
59
if response is not None :
60
- telemetry_id = response ["telemetryId" ]
60
+ if (
61
+ "exists" in response
62
+ and response ["exists" ]
63
+ and "telemetryId" in response
64
+ ):
65
+ telemetry_id = response ["telemetryId" ]
61
66
62
67
number_of_users = await Supertokens .get_instance ().get_user_count (
63
68
include_recipe_ids = None
@@ -74,17 +79,19 @@ async def handle_analytics_post(
74
79
)
75
80
76
81
data = {
77
- "websiteDomain" : websiteDomain ,
78
- "apiDomain" : apiDomain ,
82
+ "websiteDomain" : websiteDomain . get_as_string_dangerous () ,
83
+ "apiDomain" : apiDomain . get_as_string_dangerous () ,
79
84
"appName" : appName ,
80
85
"sdk" : "supertokens-python" ,
81
86
"sdkVersion" : SDKVersion ,
82
- "telemetryId" : telemetry_id ,
83
87
"numberOfUsers" : number_of_users ,
84
88
"email" : email ,
85
89
"dashboardVersion" : dashboard_version ,
86
90
}
87
91
92
+ if telemetry_id is not None :
93
+ data ["telemetryId" ] = telemetry_id
94
+
88
95
try :
89
96
async with AsyncClient () as client :
90
97
await client .post ( # type: ignore
You can’t perform that action at this time.
0 commit comments