Commits

Jens Diemer committed f3fb387

change 24h query, see: #234
---

  • Participants
  • Parent commits 9cfaa0e

Comments (0)

Files changed (1)

File djangobb_forum/views.py

 
     action = request.GET['action']
     if action == 'show_24h':
-        date = datetime.today() - timedelta(1)
-        topics = topics.filter(created__gte=date)
+        date = datetime.now() - timedelta(days=1)
+        topics = topics.filter(Q(last_post__created__gte=date) | Q(last_post__updated__gte=date))
     elif action == 'show_new':
         try:
             last_read = PostTracking.objects.get(user=request.user).last_read