diff --git a/shop/views.py b/shop/views.py index 41bf9077..9a6317a4 100644 --- a/shop/views.py +++ b/shop/views.py @@ -29,7 +29,7 @@ class ProductDetailView(LoginRequiredMixin, FormView): context_object_name = 'product' def get(self, request, *args, **kwargs): - self.product = Product.objects.get(id=kwargs.get('product_id')) + self.product = Product.objects.get(pk=kwargs.get('pk')) def form_valid(self, form): ### do we have an open order?