Skip to content

Commit 35aef5e

Browse files
jsonbaileyclaude
andcommitted
fix: Use truthy check for graph_key in __get_track_data
Change `if self._graph_key is not None` to `if self._graph_key` so that empty string is treated as "not set", matching the truthy check already used in resumption_token. Prevents round-trip data loss where a tracker with graph_key="" emits graphKey in events but omits it from the token. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bed2034 commit 35aef5e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/sdk/server-ai/src/ldai/tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def __get_track_data(self) -> dict:
189189
}
190190
if self._variation_key:
191191
data["variationKey"] = self._variation_key
192-
if self._graph_key is not None:
192+
if self._graph_key:
193193
data['graphKey'] = self._graph_key
194194
return data
195195

0 commit comments

Comments
 (0)