Skip to content

Commit

Permalink
fix: 레스토랑 평균 평점 str로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
GalaxyDimension committed Aug 13, 2024
1 parent f8060d1 commit 7d62ff0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions restaurants/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Meta:
fields = "__all__"

def get_rating_average(self, obj):
return obj.rating_average()
return str(obj.rating_average())


class RestaurantListSerializer(serializers.ModelSerializer):
Expand All @@ -29,7 +29,7 @@ class Meta:
]

def get_rating_average(self, obj):
return obj.rating_average()
return str(obj.rating_average())


class SearchHistorySerializer(serializers.ModelSerializer):
Expand All @@ -55,7 +55,7 @@ class Meta:
]

def get_rating_average(self, obj):
return obj.rating_average()
return str(obj.rating_average())

def get_image_url(self, obj):
if obj.image_url: # image_url이 null이 아닌 경우에만 처리
Expand Down Expand Up @@ -87,4 +87,4 @@ def get_reviews(self, obj):
return serializer.data

def get_rating_average(self, obj):
return obj.rating_average()
return str(obj.rating_average())

0 comments on commit 7d62ff0

Please sign in to comment.