mirror of
https://github.com/vale981/ablog
synced 2025-03-06 01:31:39 -05:00
Revised logical comparison.
This commit is contained in:
parent
c24305253d
commit
e4766fa329
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue