Peter Justin 7 лет назад
Родитель
Сommit
f3313eb418
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      flaskbb/forum/models.py

+ 2 - 1
flaskbb/forum/models.py

@@ -965,7 +965,8 @@ class Forum(db.Model, CRUDMixin):
                    Topic.last_updated > read_cutoff,
                    db.or_(TopicsRead.last_read == None,  # noqa: E711
                           TopicsRead.last_read < Topic.last_updated),
-                   ForumsRead.last_read < Topic.last_updated).\
+                   db.or_(ForumsRead.last_read == None,  # noqa: E711
+                          ForumsRead.last_read < Topic.last_updated)).\
             count()
 
         # No unread topics available - trying to mark the forum as read