Просмотр исходного кода

Fixed unittest for the unread/read tracker.

In order apply this fix, you either need to mark the forum as read or update the topics 'last_updated' status.
sh4nks 10 лет назад
Родитель
Сommit
458743c017
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      flaskbb/forum/models.py

+ 1 - 2
flaskbb/forum/models.py

@@ -681,8 +681,7 @@ class Forum(db.Model):
                               ForumsRead.user_id == user.id)).\
             filter(Topic.forum_id == self.id,
                    db.or_(TopicsRead.last_read == None,
-                          TopicsRead.last_read < Topic.last_updated),
-                   db.or_(ForumsRead.cleared < Topic.last_updated)).\
+                          TopicsRead.last_read < Topic.last_updated)).\
             count()
 
         # No unread topics available - trying to mark the forum as read