Establishments favs type
This commit is contained in:
parent
e0ad819caa
commit
f44a4bb29d
|
|
@ -419,10 +419,12 @@ class EstablishmentSimilarSerializer(EstablishmentBaseSerializer):
|
|||
|
||||
address = AddressDetailSerializer(read_only=True)
|
||||
schedule = ScheduleRUDSerializer(many=True, allow_null=True)
|
||||
establishment_type = EstablishmentTypeGeoSerializer()
|
||||
|
||||
class Meta(EstablishmentBaseSerializer.Meta):
|
||||
fields = EstablishmentBaseSerializer.Meta.fields + [
|
||||
'schedule',
|
||||
'establishment_type',
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class FavoritesEstablishmentListView(generics.ListAPIView):
|
|||
def get_queryset(self):
|
||||
"""Override get_queryset method"""
|
||||
return Establishment.objects.filter(favorites__user=self.request.user) \
|
||||
.order_by('-favorites')
|
||||
.order_by('-favorites').with_base_related()
|
||||
|
||||
|
||||
class FavoritesProductListView(generics.ListAPIView):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user