File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/kitconcept/contentsync/converters Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ class KeycloakPersonConverter(ItemConverter):
1515 ("last_name" , "lastName" ),
1616 ("contact_email" , "email" ),
1717 ("function" , "job_title" ),
18- ("company" , "subjects" )
18+ ("company" , "subjects" ),
19+ ("department" , "" )
1920 )
2021
2122 def _field__transition (self , src : t .KeycloakUser ) -> str :
@@ -51,7 +52,16 @@ def _field_job_title(self, src: t.KeycloakUser) -> str:
5152 def _field_subjects (self , src : t .KeycloakUser ) -> str :
5253 """Extracts the job title from the user attributes."""
5354 attrs = src .get ("attributes" , {}) or {}
54- subjects = attrs .get ("company" , [])
55+ subjects = []
56+
57+ abteilung = attrs .get ("company" , [None ])[0 ]
58+ if abteilung :
59+ subjects .append (f"Abteilung - { abteilung } " )
60+
61+ organisationseinheit = attrs .get ("department" , [None ])[0 ]
62+ if organisationseinheit :
63+ subjects .append (f"Organisationseinheit - { organisationseinheit } " )
64+
5565 return subjects
5666
5767
You can’t perform that action at this time.
0 commit comments