mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Fixes 3749 attribute error
This commit is contained in:
parent
3c36bec298
commit
3b76e0203a
@ -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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user