mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-22 15:51:19 +00:00
Fix for etickets
This commit is contained in:
parent
ba86219b74
commit
c9005e2c31
@ -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"'
|
||||
|
Loading…
Reference in New Issue
Block a user