Problem: Class name normalization produces invalid trailing hyphens

Problem:

A school class was named like vim-e2-blö
During import this is “ö” is replaced with “-” and looks like ‘VIM-E2-BL-’ in the end. But the import does not allow a “-” as an endcharacter of a classname.
The character replacement logic does not sufficiently validate the resulting class name. Replacing “Ö” with “-” can lead to invalid class names, for example when the character occurs at the end of the name.

raise ValidationError(self.errors.copy())

ucsschool.lib.models.attributes.ValidationError: {‘name’: [‘Value must not contain anything other than digits, letters, dots or spaces, must be at least 2 characters long, and start and end with a digit or letter!’]}

Solution:

Name your class properly.
We already have a Bugreport for this issue