Skip to content

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

Use get_subclass method from InheritanceManager

Marcin Gębalae4a02dfd9cae
diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.py
index 6a1bf7f0ee..40e2850950 100644
--- a/saleor/dashboard/order/forms.py
+++ b/saleor/dashboard/order/forms.py
@@ -85,7 +85,7 @@ class ChangeQuantityForm(forms.ModelForm):
self.fields['quantity'].initial = self.instance.quantity
def get_variant(self):
- p = Product.objects.select_subclasses().get(pk=self.instance.product.pk)
+ p = Product.objects.get_subclass(pk=self.instance.product.pk)
return p.variants.get(sku=self.instance.product_sku)
def clean_quantity(self):