# HG changeset patch # User Peter Sanchez # Date 1559408568 25200 # Sat Jun 01 10:02:48 2019 -0700 # Branch py3-dj2 # Node ID 1ea4a365fe9c964496a4a21fade43af912d973a5 # Parent a745d41b2fa1198ae1154e614236eb3518a8b3ec Updating models to __str__ diff --git a/trello_broker/models.py b/trello_broker/models.py --- a/trello_broker/models.py +++ b/trello_broker/models.py @@ -20,7 +20,7 @@ class Meta: abstract = True - def __unicode__(self): + def __str__(self): return getattr(self, 'name', u'') def save(self, *args, **kwargs): @@ -142,7 +142,7 @@ self.status = int(json_data['closed']) self.save() - def __unicode__(self): + def __str__(self): return u'{0}: {1}'.format(self.trello_board.name, self.name) @@ -233,5 +233,5 @@ verbose_name_plural = 'BitBucket Rules' unique_together = ('repo', 'action') - def __unicode__(self): + def __str__(self): return u'{0}: {1}'.format(self.repo.name, self.get_action_display())