Fix crash in oauth_callback

This commit is contained in:
Jason McBrayer 2018-08-27 08:25:27 -04:00
parent 2612f09bbb
commit 7f86e79b25

View File

@ -198,7 +198,7 @@ def oauth_callback(request):
request.session['access_token'] = access_token
user = mastodon.account_verify_credentials()
try:
account = Account.objects.get(username=user.username, client_id=client.id)
account = Account.objects.get(username=user.username)
account.access_token = access_token
account.save()
except (Account.DoesNotExist, Account.MultipleObjectsReturned):