Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add workaround for missing using in get delivery method info
fowczrek05284e948f54
diff --git a/saleor/checkout/fetch.py b/saleor/checkout/fetch.pyindex 1bfce4f52a..de7bbc1329 100644--- a/saleor/checkout/fetch.py+++ b/saleor/checkout/fetch.py@@ -13,6 +13,7 @@ from uuid import UUIDfrom django.conf import settings+from ..core.db.connection import allow_writerfrom ..core.pricing.interface import LineInfofrom ..discount import VoucherTypefrom ..discount.interface import fetch_variant_rules_info, fetch_voucher_info@@ -281,7 +282,10 @@ def get_delivery_method_info(if isinstance(delivery_method, ShippingMethodData):return ShippingMethodInfo(delivery_method, address)if isinstance(delivery_method, Warehouse):- return CollectionPointInfo(delivery_method, delivery_method.address)+ # TODO: Workaround for lack of using in tests.+ # The warehouse address should be loaded when CheckoutInfo is created.+ with allow_writer():+ return CollectionPointInfo(delivery_method, delivery_method.address)raise NotImplementedError()