Fixed amiibo detail view not filtering by collectioN

This commit is contained in:
Felipe Martín 2015-06-22 22:58:51 +02:00
parent c9ec8e34e4
commit 615c5cd2ea
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ class AmiiboView(View):
template = 'amiibo/amiibo.html'
def get(self, request, collection=None, amiibo=None):
amiibo_obj = Amiibo.objects.get(slug=amiibo)
amiibo_obj = Amiibo.objects.get(slug=amiibo,
collection__slug=collection)
return render(request, self.template, {
'selected_collection': amiibo_obj.collection,