Skip to content

Commit

Permalink
Clear profile cache on email verification
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisRayM committed Dec 14, 2020
1 parent c2ab1fe commit dfcc3ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions onadata/apps/api/viewsets/user_profile_viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ def verify_email(self, request, *args, **kwargs):
rp.save()

set_is_email_verified(rp.user.profile, True)
username = rp.user.username
# Clear profiles cache
safe_delete(f'{USER_PROFILE_PREFIX}{username}')

response_data = {
'username': rp.user.username,
Expand Down

0 comments on commit dfcc3ad

Please sign in to comment.