Update netbox/users/signals.py

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
This commit is contained in:
Arthur Hanson 2022-11-17 16:46:30 -08:00 committed by GitHub
parent 6f908f8cbf
commit 1135019d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,5 +6,5 @@ from django.contrib.auth.signals import user_login_failed
@receiver(user_login_failed)
def log_user_login_failed(sender, credentials, request, **kwargs):
logger = logging.getLogger('netbox.auth.login')
username = credentials.get("username", None)
username = credentials.get("username")
logger.info(f"Failed login attempt for username: {username}")