Problem: Userimport fails with UserValidationError: ValidationError when modifying ImportStudent

Problem:

Userimport fails with UserValidationError: ValidationError when modifying ImportStudent

Investigation

The Logfile in /var/lib/ucs-school-import/jobs/2020/<ID-des Imports>/ucs-school-import.log shows:

UserValidationError: ValidationError when modifying ImportStudent(name=‘cscheini’, school=u’sun’, dn=u’uid=cscheini,cn=schueler,cn=users,ou=sun,dc=schein,dc=me’, old_dn=‘uid=cscheini,cn=schueler,cn=users,ou=moon,dc=schein,dc=me’) (source_uid:lusd-student record_uid: 1231331): {‘name’: [‘The name is already used somewhere outside the school. It may not be taken twice and has to be changed.’]} ValidationError({‘name’: [‘The name is already used somewhere outside the school. It may not be taken twice and has to be changed.’]},)

Solution:

It could be that the user is already in school moon and is a cross-school student. It lies below the ou moon and need not to be added.

Mastodon