Don't delete saved creds if a login is blocked & forced login is off

This commit is contained in:
Andrew Ferrazzutti 2022-05-10 01:12:32 -04:00
parent 76d0ead99f
commit c691372c6a
1 changed files with 2 additions and 0 deletions

View File

@ -317,6 +317,8 @@ class User(DBUser, BaseUser):
oauth_credential = await Client.login(uuid=uuid, form=form, forced=True)
except OAuthException as e:
latest_exc = e
else:
return False
if oauth_credential:
self.oauth_credential = oauth_credential
await self.save()