Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove unused functions in shipping.models.py

IKarbowiak4c3625d6e000
diff --git a/saleor/shipping/models.py b/saleor/shipping/models.py
index 53ccbefea2..d6c9e24e11 100644
--- a/saleor/shipping/models.py
+++ b/saleor/shipping/models.py
@@ -42,18 +42,6 @@ def _applicable_price_based_methods(price: Money, qs):
return qs.filter(min_price_matched & (no_price_limit | max_price_matched))
-def _get_price_type_display(min_price, max_price):
- if max_price is None:
- return pgettext_lazy(
- "Applies to orders more expensive than the min value",
- "%(min_price)s and up",
- ) % {"min_price": format_money(min_price)}
- return pgettext_lazy(
- "Applies to order valued within this price range",
- "%(min_price)s to %(max_price)s",
- ) % {"min_price": format_money(min_price), "max_price": format_money(max_price)}
-
-
def _get_weight_type_display(min_weight, max_weight):
default_unit = get_default_weight_unit()
@@ -249,15 +237,6 @@ class ShippingMethod(models.Model):
label = mark_safe("%s %s" % (self, price_html))
return label
- def get_type_display(self):
- if self.type == ShippingMethodType.PRICE_BASED:
- return _get_price_type_display(
- self.minimum_order_price, self.maximum_order_price
- )
- return _get_weight_type_display(
- self.minimum_order_weight, self.maximum_order_weight
- )
-
class ShippingMethodTranslation(models.Model):
language_code = models.CharField(max_length=10)