~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to pybb/models.py

  • Committer: franku
  • Date: 2018-11-22 13:34:30 UTC
  • Revision ID: somal@arcor.de-20181122133430-h88x9x8ewhfogwi1
fixed issues if the website get set up from scratch

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
                   self).get_queryset().filter(hidden=True)
221
221
 
222
222
        hidden_topics = []
223
 
        for post in qs:
224
 
            if post.topic.is_hidden:
225
 
                hidden_topics.append(post.topic)
226
 
        return hidden_topics
 
223
        try:
 
224
            for post in qs:
 
225
                if post.topic.is_hidden:
 
226
                    hidden_topics.append(post.topic)
 
227
            return hidden_topics
 
228
        except:
 
229
            return []
227
230
 
228
231
 
229
232
class Post(RenderableItem):