Skip to content

Commit

Permalink
reduce logging on keycloak synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
neoflex committed Dec 12, 2022
1 parent 28be55e commit 63eeab9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/lcsb/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def test_connection(self) -> bool:

def get_list_of_users(self) -> List[Dict]:
keycloak_response = self.get_keycloak_admin_connection().get_users({'emailVerified': True})
logger.debug(keycloak_response)
return [
{
'id': user.get('id').replace(',', '').replace('(', '').replace(')', '').replace("'", ''),
Expand Down Expand Up @@ -135,7 +134,7 @@ def synchronize_single_account(self, acc: Dict[str, Optional[str]]) -> Optional[
# Let's try to find user with given e-mail
user_by_email = User.objects.filter(email=acc.get('email'))
if user_by_email.count() == 1:
user:User = user_by_email.first()
user: User = user_by_email.first()
user.oidc_id = acc.get('id')
user.save()
logger.debug(f'KC :: Set OIDC_ID ({acc.get("id")}) of a existing User (matched by email)')
Expand Down

0 comments on commit 63eeab9

Please sign in to comment.