Gracefully handle users with no ticket
This commit is contained in:
parent
3ffa5fab60
commit
0bb2f8c25d
1 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,9 @@ def ticket_type(context):
|
|||
# Default to purchased ticket type (only item from category 1)
|
||||
items = registrasion_tags.items_purchased(context, 1)
|
||||
|
||||
if not items:
|
||||
return "NO TICKET"
|
||||
|
||||
item = next(iter(items))
|
||||
name = item.product.name
|
||||
if name == "Conference Volunteer":
|
||||
|
|
Loading…
Reference in a new issue