Univention Bugzilla – Bug 51717
schoolusers/schools does not work anymore
Last modified: 2020-07-30 13:15:11 CEST
In our current unpublished packages we have an error that causes the following error message: Interner Server-Fehler in "schoolusers/schools (student)". Request: schoolusers/schools (student) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling six.reraise(etype, exc, etraceback) File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute function.__func__(self, request, *args, **kwargs) File "/usr/lib/pymodules/python2.7/ucsschool/lib/school_umc_ldap_connection.py", line 141, in wrapper_func return func(*args, **kwargs) File "/usr/lib/pymodules/python2.7/ucsschool/lib/school_umc_base.py", line 123, in schools schools = School.from_binddn(ldap_user_read) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 647, in from_binddn return School.get_all(lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 659, in get_all lo, school=None, filter_str=filter_str, easy_filter=easy_filter File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 869, in get_all ret.append(cls.from_udm_obj(udm_obj, school, lo)) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 651, in from_udm_obj obj = super(School, cls).from_udm_obj(udm_obj, school, lo) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 958, in from_udm_obj obj = cls(**deepcopy(attrs)) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/school.py", line 85, in __init__ super(School, self).__init__(name=name, **kwargs) File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 302, in __init__ self.old_dn = self.dn File "/usr/lib/pymodules/python2.7/ucsschool/lib/models/base.py", line 331, in dn name = self._meta.ldap_map_function(self.name) AttributeError: 'UCSSchoolHelperOptions' object has no attribute 'ldap_map_function' We do not know yet where this problem originates from, but it has to be fixed if we want to publish any erratas.
The problem we found was that udm_modules.get() always returned None. This is usually due to the fact that udm_modules.update() was not invoked before. My guess is that with the code reformatting and the changes of import orders an implicit udm_modules.update was previously invoked before the use of meta.py. A udm_modules.update() call was added to meta.py which fixed the problem. Please QA in oschwieg/51717 and REOPEN for merge&build
QA -> All OK -> REOPEN for merge&build Code -> OK Functionality -> OK Before fix: from ucsschool.lib.models import School from univention.admin.uldap import getAdminConnection lo,po=getAdminConnection() School.get_all(lo, None) AttributeError: 'UCSSchoolHelperOptions' object has no attribute 'ldap_map_function' The error is also raised in the school users UMC module. After fix -> no error, UMC Modules do not raise Errors.
Package: ucs-school-lib Version: 12.1.16A~4.4.0.202007231036 Branch: ucs_4.4-0 Scope: ucs-school-4.4
All OK -> VERIFIED Functionality -> OK (same as in comment 2) Changelog -> OK YAML -> OK
There is no target milestone set.
UCS@school 4.4 v5 has been released (errata update to the release). http://docs.software-univention.de/changelog-ucsschool-4.4v5-de.html#changelog:ucsschool:2020-07-30 If this error occurs again, please clone this bug.