diff --git a/forum/models.py b/forum/models.py index 2ddcc061..9f0f76e5 100644 --- a/forum/models.py +++ b/forum/models.py @@ -246,7 +246,7 @@ class ForumMessage(models.Model): super(ForumMessage, self).save(*args, **kwargs) if self.is_last_in_topic(): self.topic._last_message_id = self.id - if self.is_first_in_topic(): + if self.is_first_in_topic() and self.title: self.topic._title = self.title self.topic._message_number = self.topic.messages.count() self.topic.save() diff --git a/forum/templates/forum/macros.jinja b/forum/templates/forum/macros.jinja index c423bba4..159a1cbf 100644 --- a/forum/templates/forum/macros.jinja +++ b/forum/templates/forum/macros.jinja @@ -54,7 +54,7 @@ {% else %} {% endif %} -
{{ topic.title }}
+
{{ topic.title or topic.messages.first().title }}

{{ topic.description }}

{% if user.can_edit(topic) %}