Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix dataloader key type mismatch
Tomasz Szymanskiea25990ca4fe
diff --git a/saleor/graphql/warehouse/dataloaders.py b/saleor/graphql/warehouse/dataloaders.pyindex acd9fef4b9..28060814d2 100644--- a/saleor/graphql/warehouse/dataloaders.py+++ b/saleor/graphql/warehouse/dataloaders.py@@ -1,5 +1,6 @@from collections import defaultdictfrom typing import DefaultDict, Iterable, List, Optional, Tuple+from uuid import UUIDfrom django.conf import settings@@ -147,4 +148,4 @@ class WarehouseByIdLoader(DataLoader):def batch_load(self, keys):warehouses = Warehouse.objects.in_bulk(keys)- return [warehouses.get(warehouse_id) for warehouse_id in keys]+ return [warehouses.get(UUID(warehouse_uuid)) for warehouse_uuid in keys]