diff --git a/cds_ils/ldap/utils.py b/cds_ils/ldap/utils.py index 5ead5d027..98caaa59e 100644 --- a/cds_ils/ldap/utils.py +++ b/cds_ils/ldap/utils.py @@ -104,7 +104,13 @@ def __init__(self, remote_account): def _get_full_user_info(self): """Serialize data from user db models.""" - last_name, first_name = self.user_profile.full_name.split(",") + # workaround for the first update to format + # without this the update comparison fails + if "," in self.user_profile.full_name: + last_name, first_name = self.user_profile.full_name.split(",") + else: + last_name = self.user_profile.full_name + first_name = "" user_info = dict( user_profile_first_name=first_name.strip(), user_profile_last_name=last_name.strip(),