diff --git a/fet2020/fet2020/views.py b/fet2020/fet2020/views.py index f5d8bc79..37832cc6 100644 --- a/fet2020/fet2020/views.py +++ b/fet2020/fet2020/views.py @@ -18,13 +18,7 @@ def index(request): # set the pinned post featured_post = Post.articles.get_pinned_article() - if not featured_post: - # if a pinned post does not exist, take the last published one. - if len(posts) >= 1: - featured_post = posts.popleft() - else: - featured_post = 0 - else: + if featured_post: # remove the pinned post posts.remove(featured_post)