Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix getting variants - get by sku, not by name
Marcin Gębalaca417136a037
diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.pyindex fd367af751..4b5a5ebe59 100644--- a/saleor/dashboard/order/forms.py+++ b/saleor/dashboard/order/forms.py@@ -76,7 +76,7 @@ class ChangeQuantityForm(forms.Form):def get_variant(self):p = Product.objects.select_subclasses().get(pk=self.item.product.pk)- return p.variants.get(name=self.item.product_name)+ return p.variants.get(sku=self.item.product_sku)def clean_quantity(self):quantity = self.cleaned_data['quantity']