This commit is contained in:
Rachid Mrad 2024-05-02 14:49:40 -04:00
parent c0a967c4ea
commit 550e6df8b1
No known key found for this signature in database

View file

@ -85,9 +85,7 @@ class OpenIdConnectBackend(ModelBackend):
for key, value in kwargs.items():
# Check if the field is not 'first_name', 'last_name', or 'phone',
# or if it's 'first_name' or 'last_name' or 'phone' and the provided value is not empty
if key not in fields_to_check or (
key in fields_to_check and value
):
if key not in fields_to_check or (key in fields_to_check and value):
# Update the corresponding attribute of the user object
setattr(user, key, value)