Skip to content

Commit

Permalink
Merge branch 'ona-custom-changes' of github.com:onaio/kpi into ona-cu…
Browse files Browse the repository at this point in the history
…stom-changes
  • Loading branch information
WinnyTroy committed May 4, 2021
2 parents bd0bd78 + 9da85c3 commit e98f611
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 e98f611

Please sign in to comment.