mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-15 17:17:02 +02:00
Revisions and clean up based on PR comments
This commit is contained in:
parent
ed5d4fc4c3
commit
4adeb6722b
3 changed files with 12 additions and 23 deletions
|
@ -65,8 +65,9 @@ class OpenIdConnectBackend(ModelBackend):
|
|||
return user
|
||||
|
||||
def update_existing_user(self, user, kwargs):
|
||||
# Update other fields without overwriting first_name and last_name.
|
||||
# Overwrite first_name and last_name if not empty string
|
||||
"""Update other fields without overwriting first_name and last_name.
|
||||
Overwrite first_name and last_name if not empty string"""
|
||||
|
||||
for key, value in kwargs.items():
|
||||
# Check if the key is not first_name or last_name or value is not empty string
|
||||
if key not in ["first_name", "last_name"] or value:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue