Fixed auth service

This commit is contained in:
Sven Heidemann 2023-09-24 10:39:27 +02:00
parent b40f521212
commit e914c7d02b

View File

@ -494,11 +494,10 @@ class AuthService(AuthServiceABC):
added_user = True added_user = True
db_user = self._auth_users.get_auth_user_by_email(user_dto.email) db_user = self._auth_users.get_auth_user_by_email(user_dto.email)
user_ids = db_user.users.select(lambda x: x.id)
auth_user_relation_ids = self._auth_users.get_auth_user_relation_ids(db_user) for user in self._users.get_users_by_discord_id(dc_id):
if user.id in user_ids:
for user in db_user.users:
if user.id in auth_user_relation_ids:
continue continue
self._auth_users.add_auth_user_user_rel(AuthUserUsersRelation(db_user, user)) self._auth_users.add_auth_user_user_rel(AuthUserUsersRelation(db_user, user))