Fix unread messages in topic

Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
Skia 2017-06-10 21:05:17 +02:00
parent ca047d9655
commit 58beb551e8
2 changed files with 2 additions and 2 deletions

View File

@ -584,7 +584,7 @@ textarea {
font-size: 100%;
}
&.unread {
background: #d8e7f3;
background: $secondary-neutral-light-color;
}
}

View File

@ -182,7 +182,7 @@ class ForumTopicDetailView(CanViewMixin, DetailView):
def get_context_data(self, **kwargs):
kwargs = super(ForumTopicDetailView, self).get_context_data(**kwargs)
try:
msg = self.object.get_first_unread_message(user)
msg = self.object.get_first_unread_message(self.request.user)
kwargs['first_unread_message_id'] = msg.id
except:
kwargs['first_unread_message_id'] = float("inf")