Fix credentials lookup (#15409)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-07-10 20:33:03 +02:00
1 parent fd568d77c7
commit 1f6331c69d
2 files changed
+16 -4

No files matched your search

+1 -4
View File
@@ -311,10 +311,7 @@ class AuthManager:
if not credentials.is_new:
for user in await self._store.async_get_users():
for creds in user.credentials:
if (creds.auth_provider_type ==
credentials.auth_provider_type
and creds.auth_provider_id ==
credentials.auth_provider_id):
if creds.id == credentials.id:
return user
raise ValueError('Unable to find the user.')