Skip to content

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

Fetch values instead of object to json

Mira Szewczyk12a02ebd8cdd
diff --git a/saleor/shipping/utils.py b/saleor/shipping/utils.py
index 8e13039d84..d4099f731b 100644
--- a/saleor/shipping/utils.py
+++ b/saleor/shipping/utils.py
@@ -5,4 +5,5 @@ from .models import ShippingMethodCountry
def get_shipment_options(country_code):
return ShippingMethodCountry.objects.select_related(
'shipping_method').filter(
- Q(country_code=country_code) | Q(country_code='')).order_by('price')
+ Q(country_code=country_code) | Q(country_code='')).order_by(
+ 'price').values('price', 'shipping_method__name')