pk not id
This commit is contained in:
parent
447cf0d909
commit
d2fae2480a
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue