Skip to content

Commit

Permalink
Dont check email when creating KPI users (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankApiyo authored Apr 21, 2021
1 parent 47497b9 commit 9da85c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ona/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ def authenticate(self, request):

api_token = get_api_token(cookie_jwt)

# Create KPI User from Onadata user username and email
# Create KPI User from Onadata user username
user, created = User.objects.using('default').get_or_create(
username=api_token.user.username,
email=api_token.user.email
)
username=api_token.user.username)
if created:
grant_default_model_level_perms(user)
return (user, None)

0 comments on commit 9da85c3

Please sign in to comment.