pk not id

This commit is contained in:
Thomas Steen Rasmussen 2016-05-14 16:32:42 +02:00
parent 447cf0d909
commit d2fae2480a

View file

@ -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?