diff --git a/apps/experiments/export.py b/apps/experiments/export.py index 284916789..d60648b31 100644 --- a/apps/experiments/export.py +++ b/apps/experiments/export.py @@ -66,7 +66,7 @@ def experiment_to_message_export_rows(experiment: Experiment, tags: list[str] = experiment.get_llm_provider_model_name(raises=False), experiment.public_id, experiment.name, - session.participant.label, + session.participant.name, session.participant.identifier, session.participant.public_id, _format_tags(message.tags.all()), diff --git a/apps/experiments/models.py b/apps/experiments/models.py index aefc475b3..ec5798d9e 100644 --- a/apps/experiments/models.py +++ b/apps/experiments/models.py @@ -1283,15 +1283,6 @@ def create_anonymous(cls, team: Team, platform: str) -> "Participant": team=team, platform=platform, identifier=f"anon:{public_id}", public_id=public_id, name="Anonymous" ) - @property - def label(self): - if self.is_anonymous: - suffix = str(self.public_id)[:6] - return f"Anonymous [{suffix}]" - if self.name: - return self.name - return self.identifier - @property def is_anonymous(self): return self.identifier == f"anon:{self.public_id}" @@ -1308,9 +1299,12 @@ def global_data(self): return {} def __str__(self): + if self.is_anonymous: + suffix = str(self.public_id)[:6] + return f"Anonymous [{suffix}]" if self.name: return f"{self.name} ({self.identifier})" - elif self.user and self.user.get_full_name(): + if self.user and self.user.get_full_name(): return f"{self.user.get_full_name()} ({self.identifier})" return self.identifier diff --git a/templates/participants/single_participant_home.html b/templates/participants/single_participant_home.html index dde7912b1..e0ad44fd1 100644 --- a/templates/participants/single_participant_home.html +++ b/templates/participants/single_participant_home.html @@ -4,7 +4,7 @@ {% endblock %}