Fix previous issues (probably)

This commit is contained in:
Jason McBrayer 2018-08-29 08:46:31 -04:00
parent e913213e77
commit 4e1005c184
1 changed files with 2 additions and 1 deletions

View File

@ -188,7 +188,8 @@ def oauth_callback(request):
request.session['access_token'] = access_token
user = mastodon.account_verify_credentials()
try:
account = Account.objects.get(username=user.username)
account = Account.objects.get(username=user.username + '@' +
request.session['instance_hostname'])
account.access_token = access_token
if not account.preferences:
preferences = Preference(theme = Theme.objects.get(id=1))