updated logic in oidc backend authenticate to not override with blank first_name/last_name

This commit is contained in:
David Kennedy 2023-12-11 19:03:10 -05:00
parent 270e910520
commit fd19726a30
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 14 additions and 5 deletions

View file

@ -83,9 +83,7 @@ def login_callback(request):
user_in_db = User.objects.get(username=userinfo["sub"])
if user_in_db:
logger.info(f"This user exists in the DB (before authenticate): {user_in_db.first_name}")
userinfo["given_name"] = user_in_db.first_name
userinfo["family_name"] = user_in_db.last_name
logger.info(f"This user exists in the DB (before authenticate): {user_in_db.first_name} {user_in_db.last_name}")
except:
pass