mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Django 1.10: User.is_authenticated is now a property
This commit is contained in:
@@ -60,7 +60,7 @@ def _detect_event(request):
|
||||
LocaleMiddleware().process_request(request)
|
||||
|
||||
if not request.event.live:
|
||||
if not request.user.is_authenticated() or not EventPermission.objects.filter(
|
||||
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.'))
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class LocaleSet(View):
|
||||
|
||||
locale = request.GET.get('locale')
|
||||
if locale in [lc for lc, ll in settings.LANGUAGES]:
|
||||
if request.user.is_authenticated():
|
||||
if request.user.is_authenticated:
|
||||
request.user.locale = locale
|
||||
request.user.save()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user