do not crap out when anonymous user browses the site
This commit is contained in:
parent
d2dd113bd1
commit
a7535753a8
|
@ -15,7 +15,7 @@ def current_order(request):
|
|||
|
||||
def user_has_tickets(request):
|
||||
has_tickets = False
|
||||
if request.user.orders.filter(
|
||||
if hasattr(request.user, 'orders') and request.user.orders.filter(
|
||||
tickets__product__category__pk=settings.TICKET_CATEGORY_ID
|
||||
).exists():
|
||||
has_tickets = True
|
||||
|
|
Loading…
Reference in a new issue