Add ticket type to venueless traits

Allow permissions to be setup in venueless based on the ticket type
in addition to existing specific traits.
This commit is contained in:
Joel Addison 2022-01-05 18:11:27 +10:00
parent f1b58bc74c
commit 731858c191

View file

@ -4,6 +4,7 @@ import datetime
from decimal import Decimal
from io import BytesIO
import jwt
import re
from django.core.exceptions import ValidationError
from django.utils import timezone
@ -184,6 +185,10 @@ class CheckIn(models.Model):
traits = ["attendee"]
ticket_code = re.sub(r'\s+', '', ticket_type)
ticket_trait = f'ticket_{ticket_code}'
traits.append(ticket_trait)
if ticket_type == "Conference Volunteer":
traits.append("volunteer")
elif ticket_type == "Conference Organiser":