forked from CGM_Public/pretix_original
Fix failing requests without User-Agent
This commit is contained in:
@@ -155,7 +155,7 @@ def _default_context(request):
|
||||
if not gs.settings.update_check_ack and 'runserver' not in sys.argv:
|
||||
ctx['warning_update_check_active'] = True
|
||||
|
||||
ctx['ie_deprecation_warning'] = 'MSIE' in request.headers['User-Agent'] or 'Trident/' in request.headers['User-Agent']
|
||||
ctx['ie_deprecation_warning'] = 'MSIE' in request.headers.get('User-Agent', '') or 'Trident/' in request.headers.get('User-Agent', '')
|
||||
|
||||
if request.user.is_authenticated:
|
||||
ctx['staff_session'] = request.user.has_active_staff_session(request.session.session_key)
|
||||
|
||||
Reference in New Issue
Block a user