diff --git a/restaurants/serializers.py b/restaurants/serializers.py index e959175..6dd430d 100644 --- a/restaurants/serializers.py +++ b/restaurants/serializers.py @@ -1,7 +1,7 @@ from rest_framework import serializers from .models import Restaurant, SearchHistory, UserRestaurantsList -from reviews.serializers import ReviewSerializer +from reviews.serializers import ReviewListSerializer class RestaurantSerializer(serializers.ModelSerializer): @@ -75,7 +75,7 @@ class Meta: def get_reviews(self, obj): reviews = obj.reviews.order_by("-recommend_count")[:4] - serializer = ReviewSerializer(reviews, many=True) + serializer = ReviewListSerializer(reviews, many=True) return serializer.data def get_rating_average(self, obj):