Cast some variables as strings to prevent errors

parent 3d9fa225
...@@ -10,7 +10,7 @@ class Author(models.Model): ...@@ -10,7 +10,7 @@ class Author(models.Model):
bio = models.TextField(blank=True, null=True) bio = models.TextField(blank=True, null=True)
def __str__(self): def __str__(self):
return self.first_name + ' ' + self.last_name return str(self.first_name) + " " + str(self.last_name)
def get_absolute_url(self): def get_absolute_url(self):
return reverse('bookshelf:author-item', kwargs={'pk': self.pk}) return reverse('bookshelf:author-item', kwargs={'pk': self.pk})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment