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:
parent
f1b58bc74c
commit
731858c191
1 changed files with 5 additions and 0 deletions
5
vendor/regidesk/regidesk/models.py
vendored
5
vendor/regidesk/regidesk/models.py
vendored
|
@ -4,6 +4,7 @@ import datetime
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import jwt
|
import jwt
|
||||||
|
import re
|
||||||
|
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
@ -184,6 +185,10 @@ class CheckIn(models.Model):
|
||||||
|
|
||||||
traits = ["attendee"]
|
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":
|
if ticket_type == "Conference Volunteer":
|
||||||
traits.append("volunteer")
|
traits.append("volunteer")
|
||||||
elif ticket_type == "Conference Organiser":
|
elif ticket_type == "Conference Organiser":
|
||||||
|
|
Loading…
Reference in a new issue