Skip to content

Commit 1c7fe0c

Browse files
committed
Fix mixpanel
1 parent 87b1f87 commit 1c7fe0c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,19 @@ 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+
user_id = self.__class__.TEAM_DATA.data.creator_id
42+
team_name = self.__class__.TEAM_DATA.data.name
4143
properties["Success"] = self._success
4244
default = get_default(
43-
team_name=self.__class__.TEAM_DATA[1],
44-
user_id=self.__class__.TEAM_DATA[0],
45+
team_name=team_name,
46+
user_id=user_id,
4547
project_name=properties.get("project_name", None),
4648
)
4749
properties.pop("project_name", None)
4850
properties = {**default, **properties}
4951

5052
if "pytest" not in sys.modules:
51-
mp.track(controller.user_id, event_name, properties)
53+
mp.track(user_id, event_name, properties)
5254
except Exception as _:
5355
pass
5456

0 commit comments

Comments
 (0)