Skip to content

Commit

Permalink
modify function name
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan7n committed Nov 27, 2023
1 parent 95173bc commit 79df3bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/user/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from drf_spectacular.plumbing import build_bearer_security_scheme_object


def __get_email_from_token(validated_token):
def get_email_from_token(validated_token):
try:
return validated_token[settings.TOKEN_USER_EMAIL_CLAIM]
except KeyError:
Expand All @@ -24,7 +24,7 @@ def get_user(self, validated_token):
try:
user = self.user_model.objects.get(**{api_settings.USER_ID_FIELD: user_id})
except self.user_model.DoesNotExist:
user_email = __get_email_from_token(validated_token)
user_email = get_email_from_token(validated_token)
user = self.user_model.objects.create_user(
**{api_settings.USER_ID_FIELD: user_id}, email=user_email
)
Expand Down

0 comments on commit 79df3bf

Please sign in to comment.