Univention Bugzilla – Full Text Bug Listing |
Summary: | udm/layout (groups/group): AttributeError: 'Group' object has no attribute 'append' | ||
---|---|---|---|
Product: | UCS | Reporter: | Johannes Keiser <keiser> |
Component: | UDM (Generic) | Assignee: | Florian Best <best> |
Status: | CLOSED FIXED | QA Contact: | Jannik Ahlers <ahlers> |
Severity: | normal | ||
Priority: | P5 | CC: | a.burkert, best, requate |
Version: | UCS 4.3 | Flags: | best:
Patch_Available+
|
Target Milestone: | UCS 4.4-0-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=23988 https://forge.univention.org/bugzilla/show_bug.cgi?id=28629 |
||
What kind of report is it?: | Bug Report | What type of bug is this?: | 7: Crash: Bug causes crash or data loss |
Who will be affected by this bug?: | 1: Will affect a very few installed domains | How will those affected feel about the bug?: | 5: Blocking further progress on the daily work |
User Pain: | 0.200 | Enterprise Customer affected?: | |
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2019031421001643, 2019012821001157 | Bug group (optional): | Error handling, External feedback |
Max CVSS v3 score: |
Description
Johannes Keiser
2019-01-31 13:18:00 CET
*** Bug 24987 has been marked as a duplicate of this bug. *** Reproducible: eval "$(ucr shell)" udm settings/extended_attribute create \ --position "cn=custom attributes,cn=univention,$ldap_base" \ --set name=testProperty1 \ --set objectClass=univentionFreeAttributes \ --set ldapMapping=univentionFreeAttribute1 \ --set module=users/user \ --set tabName=Account \ --set groupName=Windows \ --set overwritePosition=Windows \ --set shortDescription="Test Field 1" If that occurrs, the whole UDM is not usable anymore: # udm users/user list Traceback (most recent call last): File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 218, in doit output = univention.admincli.admin.doit(arglist) File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 408, in doit out = _doit(arglist) File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 623, in _doit univention.admin.modules.init(lo, position, module) File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 140, in init update_extended_attributes(lo, module, position) File "/usr/lib/pymodules/python2.7/univention/admin/modules.py", line 537, in update_extended_attributes item.append(ea_layout.label) AttributeError: 'Group' object has no attribute 'append' Patch available in fbest/48551-extended-attribute-layout. diff --git a/management/univention-directory-manager-modules/modules/univention/admin/modules.py b/management/univention-directory-manager-modules/modules/univention/admin/modules.py index 66d21b06d7..25d8a805ef 100644 --- a/management/univention-directory-manager-modules/modules/univention/admin/modules.py +++ b/management/univention-directory-manager-modules/modules/univention/admin/modules.py @@ -537 +537 @@ def update_extended_attributes(lo, module, position): -» » » » » » » » » item.append(ea_layout.label) +» » » » » » » » » item.layout.append(ea_layout.label) The bug has been introduced by Bug #23988: commit d56dd9692197b6acb4d7961627a7017c41a04b2a Date: Mon Oct 17 15:22:54 2011 +0000 EA_Layout never had a .layout attribute. One of the errors back then has been fixed by Bug #28629 but they missed the second/this error. commit 26fddab7d000118025e3fafda7a834c70b5b7249 Date: Wed Oct 30 13:29:18 2013 +0000 Hi! We ran into the same problem in a customer environment with UCS 4.4-0 Errata 5. We tried the proposed patch, but this resulted in a new error message, until we changed the line to +» » » » » » » » » item.layout.append(ea_layout.name) We haven't done an in-depth code analysis, it was more of a guess. Could this work or have we created a possible new problem? (In reply to Andreas Burkert from comment #5) > Hi! > > We ran into the same problem in a customer environment with UCS 4.4-0 Errata > 5. We tried the proposed patch, but this resulted in a new error message, > until we changed the line to > > +» » » » » » » » » item.layout.append(ea_layout.name) > > We haven't done an in-depth code analysis, it was more of a guess. Could > this work or have we created a possible new problem? Oups, your line is the correct one. I did copy my old patch. Reported again: Version: 4.4-0 errata0 (Blumenthal) - UCS@school 4.4 v1 Internal server error during "schoolexam/exam/start". Request: schoolexam/exam/start Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 253, in execute function.__func__(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 636, in _decorated return function(self, request, *args, **kwargs) File "%PY2.7%/ucsschool/lib/schoolldap.py", line 145, in wrapper_func return func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/schoolexam/__init__.py", line 188, in start_exam sender = util.distribution.openRecipients(self.user_dn, ldap_user_read) File "%PY2.7%/univention/management/console/modules/distribution/util.py", line 199, in openRecipients user = ucsschool.lib.models.User.from_dn(entryDN, None, ldap_connection) File "%PY2.7%/ucsschool/lib/models/base.py", line 914, in from_dn cls.init_udm_module(lo) File "%PY2.7%/ucsschool/lib/models/base.py", line 776, in init_udm_module udm_modules.init(lo, pos, udm_modules.get(cls._meta.udm_module)) File "%PY2.7%/univention/admin/modules.py", line 140, in init update_extended_attributes(lo, module, position) File "%PY2.7%/univention/admin/modules.py", line 537, in update_extended_attributes item.append(ea_layout.label) AttributeError: 'Group' object has no attribute 'append' Role: domaincontroller_master The patch has been applied. univention-directory-manager-modules (14.0.12-20) 1a0e6f57e1df | Bug #48551: fix extended attribute layout when group is not available univention-directory-manager-modules.yaml 9762eb559436 | YAML Bug #48551 730de16 Bug #48551: adjust wording in yaml I made a slight enhancement to the wording of the yaml. traceback doesn't appear - OK yaml - OK installation - OK *** Bug 49570 has been marked as a duplicate of this bug. *** |