Skip to content

Commit 8dc31ed

Browse files
committed
Fix AppleIdAuth backend filling user details with None.
It's a general convention that this project follows to use '' instead of `None`. Most of of the other backends use ''.
1 parent 9d93069 commit 8dc31ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

social_core/backends/apple.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,9 @@ def get_user_details(self, response):
142142

143143
email = response.get('email', '')
144144
apple_id = response.get(self.ID_KEY, '')
145-
# prevent updating User with empty strings
146145
user_details = {
147-
'first_name': first_name or None,
148-
'last_name': last_name or None,
146+
'first_name': first_name,
147+
'last_name': last_name,
149148
'email': email,
150149
}
151150
if email and self.setting('EMAIL_AS_USERNAME'):

0 commit comments

Comments
 (0)