diff --git a/fet2020/fet2020/views.py b/fet2020/fet2020/views.py index 053355ac..ad3af9ee 100644 --- a/fet2020/fet2020/views.py +++ b/fet2020/fet2020/views.py @@ -18,11 +18,7 @@ def index(request): # set the pinned post pinned_post = Post.articles.pinned() - if not pinned_post: - # if a pinned post does not exist, take the last published one. - if len(posts) >= 1: - pinned_post = posts.popleft() - else: + if pinned_post: # remove the pinned post posts.remove(pinned_post)