Changeset - 0bb2f8c25dde
[Not reviewed]
0 1 0
James Polley - 6 years ago 2018-01-14 22:10:48
jp@jamezpolley.com
Gracefully handle users with no ticket
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
pinaxcon/templatetags/lca2018_tags.py
Show inline comments
...
 
@@ -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":
0 comments (0 inline, 0 general)