From c9005e2c313ae6f3c7f110204995b5e0bd716e20 Mon Sep 17 00:00:00 2001 From: klmp200 Date: Sat, 15 Oct 2016 19:58:51 +0200 Subject: [PATCH] Fix for etickets --- counter/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/counter/views.py b/counter/views.py index 5eb52709..d2d8bbfe 100644 --- a/counter/views.py +++ b/counter/views.py @@ -1019,7 +1019,8 @@ class EticketPDFView(CanViewMixin, DetailView): self.object = self.get_object() eticket = self.object.product.eticket user = self.object.customer.user - code = "%s %s %s" % (self.object.customer.user.id, self.object.product.id, self.object.quantity) + print(self.object) + code = "%s %s %s %s" % (self.object.customer.user.id, self.object.product.id, self.object.id, self.object.quantity) code += " " + eticket.get_hash(code)[:8].upper() response = HttpResponse(content_type='application/pdf') response['Content-Disposition'] = 'filename="eticket.pdf"'