diff --git a/python/nav/web/webfront/views.py b/python/nav/web/webfront/views.py index cb495d8699..9722061a38 100644 --- a/python/nav/web/webfront/views.py +++ b/python/nav/web/webfront/views.py @@ -229,16 +229,11 @@ def do_login(request): LogEntry.add_log_entry( account, 'log-in', '{actor} logged in', before=account ) - - try: - auth.set_request_account(request, account) - except ldap.Error as error: - errors.append('Error while talking to LDAP:\n%s' % error) - else: - _logger.info("%s successfully logged in", account.login) - if not origin: - origin = reverse('webfront-index') - return HttpResponseRedirect(origin) + auth.set_request_account(request, account) + _logger.info("%s successfully logged in", account.login) + if not origin: + origin = reverse('webfront-index') + return HttpResponseRedirect(origin) else: _logger.info("failed login: %r", username) errors.append(