Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
fix self.tags error on CodeFeed
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanpitts committed Mar 6, 2013
1 parent 5296c0d commit 186ffa5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/base/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def items(self, obj):
class CodeFeed(ObjectWithTagsFeed):
def title(self, obj):
identifier = ""
if self.tags:
if self.tag_slugs:
identifier = " tagged '%s'" % "+".join([tag.name for tag in self.tags])
return "Source: Code%s" % identifier

Expand All @@ -105,6 +105,7 @@ def item_description(self, item):

def items(self, obj):
queryset = Code.live_objects.order_by('-created')
queryset = get_tag_filtered_queryset(queryset, self.tag_slug_list)
if self.tag_slugs:
queryset = get_tag_filtered_queryset(queryset, self.tag_slug_list)
return queryset[:20]

0 comments on commit 186ffa5

Please sign in to comment.