Revised logical comparison.

This commit is contained in:
Ahmet Bakan 2014-11-24 16:31:48 -08:00
parent c24305253d
commit e4766fa329

View file

@ -228,7 +228,7 @@ class Blog(object):
def link_posts(self):
"""Link posts after sorting them post by published date."""
if hasattr(self, '_posts_sorted') is False:
if getattr(self, '_posts_sorted', False):
posts = [post for post in self.posts if post.order == 1]
posts.sort()
posts[0].prev = posts[-1].next = None