diff --git a/bigbluebutton/django/models.py b/bigbluebutton/django/models.py index 5dcc3bfd0a7edcf0d717791875769eb00e96c0b1..af33293139a0eaf0f561f41472e693bf22353d58 100644 --- a/bigbluebutton/django/models.py +++ b/bigbluebutton/django/models.py @@ -35,6 +35,9 @@ class BigBlueButton(models.Model): _api = None + def __str__(self) -> str: + return self.name + @property def api(self) -> _BigBlueButton: """The real :class:`~bigbluebutton.api.bigbluebutton.BigBlueButton` API object. @@ -63,6 +66,9 @@ class BigBlueButtonGroup(models.Model): _api_group = None + def __str__(self) -> str: + return self.name + @property def api_group(self) -> _BigBlueButtonGroup: """The real :class:`~bigbluebutton.api.bigbluebutton.BigBlueButtonGroup` API object. @@ -105,6 +111,9 @@ class Meeting(models.Model): _meeting = None + def __str__(self) -> str: + return self.name + @classmethod def from_api(cls, api: _BigBlueButton, meeting: _Meeting) -> "Meeting": """Create a persistent meeting object from the live API. @@ -225,6 +234,9 @@ class APIToken(models.Model): guid = models.UUIDField(default=uuid.uuid1, editable=False) + def __str__(self) -> str: + return self.name + def clean(self) -> None: """Ensure a user is linked when the user scope is selected.""" if self.scope == "user" and not self.user: