Skip to content

Commit d79fdae

Browse files
authored
Merge pull request #240 from superannotateai/fix-mixpanel
Fix mixpanel
2 parents 8898179 + e1d4d2a commit d79fdae

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/superannotate/lib/app/mixp/decorators.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,20 @@ def track(self, *args, **kwargs):
3838
data = getattr(parsers, self.function.__name__)(*args, **kwargs)
3939
event_name = data["event_name"]
4040
properties = data["properties"]
41+
team_data = self.__class__.TEAM_DATA.data
42+
user_id = team_data.creator_id
43+
team_name = team_data.name
4144
properties["Success"] = self._success
4245
default = get_default(
43-
team_name=self.__class__.TEAM_DATA[1],
44-
user_id=self.__class__.TEAM_DATA[0],
46+
team_name=team_name,
47+
user_id=user_id,
4548
project_name=properties.get("project_name", None),
4649
)
4750
properties.pop("project_name", None)
4851
properties = {**default, **properties}
4952

5053
if "pytest" not in sys.modules:
51-
mp.track(controller.user_id, event_name, properties)
54+
mp.track(user_id, event_name, properties)
5255
except Exception as _:
5356
pass
5457

0 commit comments

Comments
 (0)