diff --git a/app/application/services/rating_service.py b/app/application/services/rating_service.py index 20586b4..72c5803 100644 --- a/app/application/services/rating_service.py +++ b/app/application/services/rating_service.py @@ -56,8 +56,10 @@ def remove_comment(self, rating_id: int): if not rating: return None - # Remove the comment but keep the score - rating.comment = None - self.repository.update(rating_id, rating) + # Créer un DTO de mise à jour avec seulement le commentaire à null + update_dto = RatingUpdateDTO(value=rating.value, comment=None) - return rating + # Mettre à jour le rating + updated_rating = self.repository.update(rating_id, update_dto) + + return updated_rating