Skip to content
Snippets Groups Projects
Commit 832fe40f authored by Andreas Hubel's avatar Andreas Hubel
Browse files

chore(event): make public_speakers() a cached_property

parent 9bfeebde
No related branches found
No related tags found
No related merge requests found
...@@ -195,7 +195,7 @@ class Event(TaggedItemMixin, BackendMixin, ActivityLogMixin, models.Model): ...@@ -195,7 +195,7 @@ class Event(TaggedItemMixin, BackendMixin, ActivityLogMixin, models.Model):
return hub_absolute('plainui:event', event_slug=self.slug, i18n=settings.ARCHIVE_MODE) return hub_absolute('plainui:event', event_slug=self.slug, i18n=settings.ARCHIVE_MODE)
@property @cached_property
def public_speakers(self) -> list: def public_speakers(self) -> list:
"""Returns a list of all public speakers of this event.""" """Returns a list of all public speakers of this event."""
persons = [participant.participant for participant in self.participants.filter(is_public=True, role=EventParticipant.Role.SPEAKER)] persons = [participant.participant for participant in self.participants.filter(is_public=True, role=EventParticipant.Role.SPEAKER)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment