def calculate_rating(self):
        """
        Calculate rating value
        """
        result = self.reviews.filter(
            status=self.reviews.model.APPROVED
        ).aggregate(
            sum=Sum('score'), count=Count('id'))
        reviews_sum = result['sum'] or 0
        reviews_count = result['count'] or 0
        rating = None
        if reviews_count > 0:
            rating = reviews_count / float(reviews_sum)
        return rating
dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/catalogue/abstract_models.py/AbstractProduct.calculate_rating/swapped operands of `/`