mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Unit Tests should create enabled events
This commit is contained in:
@@ -55,7 +55,7 @@ class EventMiddleware:
|
||||
path = request.get_full_path().split("/", 2)[-1]
|
||||
return redirect(urljoin('%s://%s' % (request.scheme, domain), path))
|
||||
|
||||
if not request.event.live:
|
||||
if hasattr(request, 'event') and not request.event.live:
|
||||
if not request.user.is_authenticated() or not EventPermission.objects.filter(
|
||||
event=request.event, user=request.user).exists():
|
||||
raise PermissionDenied(_('The selected ticket shop is currently not available.'))
|
||||
|
||||
Reference in New Issue
Block a user