mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Small fix with forum topic titles
Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
parent
06b67f1d27
commit
32ac6640ab
@ -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()
|
||||
|
@ -54,7 +54,7 @@
|
||||
{% else %}
|
||||
<a class="ib w_big" href="{{ url('forum:view_topic', topic_id=topic.id) }}">
|
||||
{% endif %}
|
||||
<div class="title">{{ topic.title }}</div>
|
||||
<div class="title">{{ topic.title or topic.messages.first().title }}</div>
|
||||
<p>{{ topic.description }}</p>
|
||||
</a>
|
||||
{% if user.can_edit(topic) %}
|
||||
|
Loading…
Reference in New Issue
Block a user