diff --git a/shop/context_processors.py b/shop/context_processors.py index 8246d85f..9e1e27dc 100644 --- a/shop/context_processors.py +++ b/shop/context_processors.py @@ -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