Commits

Josh VanderLinden  committed c35ef5f

#17 - Taking advantage of a short circuit when there's only one article to show

  • Participants
  • Parent commits c7abb28

Comments (0)

Files changed (1)

File articles/templatetags/article_tags.py

             articles = articles[(int(self.start) - 1):int(self.end)]
 
         # don't send back a list when we really don't need/want one
-        if len(articles) == 1 and int(self.count) == 1 and not self.start:
+        if len(articles) == 1 and not self.start and int(self.count) == 1:
             articles = articles[0]
 
         # put the article(s) into the context