Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/kitconcept/contentsync/converters/keycloak.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ def _field_title(self, src: t.KeycloakUser) -> str:
return f"{last_name}, {first_name}"

def _field_contact_phone(self, src: t.KeycloakUser) -> str:
"""Constructs the title from the first and last name."""
"""Extract the mobile or phone number from the user attributes."""
attrs = src.get("attributes", {}) or {}
phone = attrs.get("phone", [""])[0]
mobile = attrs.get("mobile", [""])[0]
return phone or mobile
return mobile or phone

def _blocks_factory_(self, src: t.KeycloakUser) -> VoltoBlocksInfo:
"""Constructs the blocks for the user."""
Expand Down
Loading