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

View File

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