Skip to content

Commit 4f85340

Browse files
authored
Merge pull request #27 from gagantrivedi/fix/alias
fix: Add distinct id to $create_alias event
2 parents 15ebe85 + ac61fb0 commit 4f85340

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

posthog/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def alias(self, previous_id=None, distinct_id=None, context=None, timestamp=None
151151
"timestamp": timestamp,
152152
"context": context,
153153
"event": "$create_alias",
154+
"distinct_id": previous_id,
154155
}
155156

156157
return self._enqueue(msg)

posthog/consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def next(self):
117117
return items
118118

119119
def request(self, batch):
120-
"""Attempt to upload the batch and retry before raising an error """
120+
"""Attempt to upload the batch and retry before raising an error"""
121121

122122
def fatal_exception(exc):
123123
if isinstance(exc, APIError):

0 commit comments

Comments
 (0)