Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Sort items before grouping
Adam Bogdalf591a264595a
diff --git a/cart/__init__.py b/cart/__init__.pyindex e5fbaef008..c1e17d9126 100755--- a/cart/__init__.py+++ b/cart/__init__.py@@ -68,6 +68,7 @@ class CartPartitioner(Partitioner):'''Change this method to provide custom delivery groups.'''+ self.subject = sorted(self.subject, key=self.classify)for classifier, items in groupby(self.subject, self.classify):delivery_class = self.get_delivery_class(classifier)delivery = delivery_class(items)