hSaria 6 лет назад
Родитель
Сommit
3b76e0203a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      netbox/users/views.py

+ 1 - 1
netbox/users/views.py

@@ -96,7 +96,7 @@ class ChangePasswordView(LoginRequiredMixin, View):
 
     def get(self, request):
         # LDAP users cannot change their password here
-        if getattr(request.user, 'ldap_username'):
+        if getattr(request.user, 'ldap_username', None):
             messages.warning(request, "LDAP-authenticated user credentials cannot be changed within NetBox.")
             return redirect('user:profile')