diff --git a/app/api/helpers/csv_jobs_util.py b/app/api/helpers/csv_jobs_util.py index edf9b3f88e..71ae66d7ae 100644 --- a/app/api/helpers/csv_jobs_util.py +++ b/app/api/helpers/csv_jobs_util.py @@ -107,7 +107,7 @@ def get_order_ticket_data(attendee, order, ticket): ticketId = '' if order.identifier: if not attendee.identifier: - ticketId = order.identifier + '-' + attendee.get_new_identifier() + ticketId = order.identifier + '-' + str(attendee.id) else: ticketId = order.identifier + '-' + attendee.identifier diff --git a/app/models/ticket_holder.py b/app/models/ticket_holder.py index d9fa9251cb..ddea51fa41 100644 --- a/app/models/ticket_holder.py +++ b/app/models/ticket_holder.py @@ -118,7 +118,7 @@ def qr_code(self): ) identifier = self.identifier if not self.identifier: - identifier = get_new_id() + identifier = str(self.id) qr.add_data(self.order.identifier + "-" + identifier) qr.make(fit=True) @@ -155,8 +155,3 @@ def pdf_url_path(self) -> str: + self.order.identifier + '.pdf' ) - - @staticmethod - def get_new_identifier(): - """Generate a new identifier for the ticket holder.""" - return str(binascii.b2a_hex(os.urandom(3)), 'utf-8') diff --git a/app/templates/pdf/attendees_pdf.html b/app/templates/pdf/attendees_pdf.html index cc3047eef9..d4fefd4729 100644 --- a/app/templates/pdf/attendees_pdf.html +++ b/app/templates/pdf/attendees_pdf.html @@ -129,9 +129,9 @@

{{ holders[0].event.name }} - {{ ("Attendees List {{ "Free Ticket" }}
{% endif %} {% if holder.identifier %} - {{ holder.order.identifier }} - {{ holder.identifier }}
+ {{ holder.order.identifier }}-{{ holder.identifier }}
{% else %} - {{ holder.order.identifier }} - {{ holder.get_new_identifier()}}
+ {{ holder.order.identifier }}-{{ holder.id }}
{% endif %} {{ holder.ticket.name }}
{% if holder.is_checked_in %}