Browse Source

Prevent Whooshee breaking when adding topic

djsilcock 8 years ago
parent
commit
35ab71a6bc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      flaskbb/utils/search.py

+ 2 - 2
flaskbb/utils/search.py

@@ -65,7 +65,7 @@ class TopicWhoosheer(AbstractWhoosheer):
             topic_id=topic.id,
             topic_id=topic.id,
             title=topic.title,
             title=topic.title,
             username=topic.username,
             username=topic.username,
-            content=topic.first_post.content
+            content=getattr(topic.first_post,'content',None)
         )
         )
 
 
     @classmethod
     @classmethod
@@ -74,7 +74,7 @@ class TopicWhoosheer(AbstractWhoosheer):
             topic_id=topic.id,
             topic_id=topic.id,
             title=topic.title,
             title=topic.title,
             username=topic.username,
             username=topic.username,
-            content=topic.first_post.content
+            content=getattr(topic.first_post,'content',None)
         )
         )
 
 
     @classmethod
     @classmethod