From 6f767a144f71a08b1c5df0058e2122f1ea5b0512 Mon Sep 17 00:00:00 2001 From: Jpadilla1 Date: Tue, 29 Apr 2014 23:02:24 -0400 Subject: [PATCH] fix js jumping message 2 --- apps/chats/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/chats/views.py b/apps/chats/views.py index 09c8fbb..cbdeafb 100644 --- a/apps/chats/views.py +++ b/apps/chats/views.py @@ -58,7 +58,7 @@ def get_context_data(self, **kwargs): context['room'] = get_object_or_404(ChatRoom, slug=self.kwargs['slug']) context['room_messages'] = Message.objects.filter(room=context['room']) if context['room_messages'].count() > 0: - context['room_message_last'] = context['room_messages'].last().id-1 + context['room_message_last'] = context['room_messages'].last().id - 1 users = User.objects.filter( last_login__gt=self.request.user.last_logged_out, is_active__exact=1, ).order_by('-last_login')