version 0.0.22 updated CollectionList get_queryset method

This commit is contained in:
Anatoly 2019-08-21 16:57:35 +03:00
parent 507bae7b0d
commit b72f9956cf

View File

@ -34,7 +34,7 @@ class CollectionListView(CollectionViewMixin, generics.ListAPIView):
"""Override get_queryset method"""
country_id = self.request.query_params.get('country_id')
return models.Collection.objects.published()\
.filter(country=country_id)
.by_country(country=country_id)
class CollectionRetrieveView(CollectionViewMixin, generics.RetrieveAPIView):