Skip to content

Commit

Permalink
use id_or_slug for reviews feed
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Balogh committed Dec 27, 2010
1 parent a395790 commit e82acff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/reviews/feeds.py
Expand Up @@ -18,7 +18,7 @@ class ReviewsRss(Feed):
def get_object(self, request, addon_id):
"""Get the Addon for which we are about to output
the RSS feed of it Review"""
self.addon = get_object_or_404(Addon.objects.valid(), pk=addon_id)
self.addon = get_object_or_404(Addon.objects.id_or_slug(addon_id))
return self.addon

def title(self, addon):
Expand Down
5 changes: 5 additions & 0 deletions apps/reviews/tests/test_views.py
Expand Up @@ -23,6 +23,11 @@ def test_404_user_page(self):
r = self.client.get(url)
eq_(r.status_code, 404)

def test_feed(self):
url = reverse('reviews.list.rss', args=['a1865'])
r = self.client.get(url)
eq_(r.status_code, 200)


class TestFlag(ReviewTest):

Expand Down

0 comments on commit e82acff

Please sign in to comment.