Univention Bugzilla – Bug 54695
[5.0] ucsschool.lib drops one OU when adding and removing a school to/from a user at the same time
Last modified: 2022-04-27 13:17:56 CEST
Backport the fix from Bug 54690 to UCS@school 4.4. ====================================================================== +++ This bug was initially created as a clone of Bug #54690 +++ When a user has 2 OUs and in a modify operation one is removed and another is added, the additional OU is later missing in the "schools" attribute: -------------------------------------------------------------------------------- user = Student(name="stud9", school="DEMOSCHOOL", schools=["DEMOSCHOOL", "school1"], firstname='James9', lastname='Bond9', school_classes={'DEMOSCHOOL': ['ds'], 'school1': ['s1']}) user.create(lo) user.schools = ["DEMOSCHOOL", "school2"] user.school_classes={'DEMOSCHOOL': ['ds'], 'school2': ['s2']} user.modify(lo) print("school={!r} schools={!r} school_classes={!r}".format(user.school, user.schools, user.school_classes)) → school=u'DEMOSCHOOL' schools=[u'DEMOSCHOOL'] school_classes={'school2': ['s2'], 'DEMOSCHOOL': ['ds']} --------------------------- validation ----------------------------------------- ... UCS@school Object ... with options {...} has validation errors: - is not part of schools: ['school2']. -------------------------------------------------------------------------------- Fix the ucsschool.lib in to contain all OUs in the "schools" attribute.