Calculate the price range of the products variants

def price_range(self):
        """ Calculate the price range of the products variants
        """
        ordered = self.variants.order_by('base_price')
        if ordered:
            return ordered.first().price, ordered.last().price
        else:
            return None, None