counter: fix eticket server crash induced by old permission system and fix Selling permission

This commit is contained in:
2019-10-16 21:21:51 +02:00
parent 811809895e
commit 241650c171
2 changed files with 7 additions and 1 deletions

View File

@ -1752,7 +1752,11 @@ class EticketPDFView(CanViewMixin, DetailView):
from reportlab.graphics.barcode.qr import QrCodeWidget
from reportlab.graphics import renderPDF
self.object = self.get_object()
if not (
hasattr(self.object, "product") and hasattr(self.object.product, "eticket")
):
raise Http404
eticket = self.object.product.eticket
user = self.object.customer.user
code = "%s %s %s %s" % (