Skip to content

Commit

Permalink
GITC-434: handle invalid user access tokens (#9507)
Browse files Browse the repository at this point in the history
* Update crontab2

* update CLR running

* handle invalid access tokens

Co-authored-by: Aditya Anand M C <[email protected]>
  • Loading branch information
chibie and thelostone-mc authored Sep 22, 2021
1 parent 6d7d187 commit 79749d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/marketing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ def settings_helper_get_auth(request, key=None):
# check if user's email has changed
if request.user.is_authenticated and request.user.profile:
current_email = get_github_primary_email(request.user.profile.github_access_token)
if not current_email:
request.user.profile.github_access_token = ''
request.user.profile.save()
if current_email != request.user.profile.email:
request.user.profile.email = current_email
request.user.profile.save()
Expand Down

0 comments on commit 79749d0

Please sign in to comment.