Skip to content

Commit

Permalink
chore: 상세페이지 답글 수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfla committed Aug 7, 2024
1 parent e1646fa commit 57f2f3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions restaurants/serializers.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 57f2f3f

Please sign in to comment.