Univention Bugzilla – Full Text Bug Listing |
Summary: | Traceback: univention.admin.defaults tries to modify default values | ||
---|---|---|---|
Product: | UCS | Reporter: | Philipp Hahn <hahn> |
Component: | UDM (Generic) | Assignee: | Johannes Keiser <keiser> |
Status: | CLOSED FIXED | QA Contact: | Florian Best <best> |
Severity: | normal | ||
Priority: | P5 | CC: | best, michelsmidt |
Version: | UCS 4.2 | Flags: | hahn:
Patch_Available+
|
Target Milestone: | UCS 4.2-1-errata | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | http://forge.univention.org/bugzilla/show_bug.cgi?id=38110 | ||
What kind of report is it?: | Development Internal | What type of bug is this?: | --- |
Who will be affected by this bug?: | --- | How will those affected feel about the bug?: | --- |
User Pain: | Enterprise Customer affected?: | ||
School Customer affected?: | Yes | ISV affected?: | |
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2017062221000458, 2017080221000161 | Bug group (optional): | External feedback |
Max CVSS v3 score: | |||
Bug Depends on: | |||
Bug Blocks: | 41053 | ||
Attachments: |
unittest for univention.admin#property.default
Fix udm property default handling |
Description
Philipp Hahn
2017-01-23 10:20:29 CET
Created attachment 8364 [details] Fix udm property default handling >>> issubclass(types.StringType, basestring) True >>> issubclass(types.UnicodeType, basestring) True handlers/__init__.py@710 »···»···for name, p in self.descriptions.items(): »···»···»···# ... if property has no option or any required option is currently enabled -»···»···»···if self.has_key(name) and self.descriptions[name].default(self): -»···»···»···if self.has_key(name) and p.default(self): Applied patch: r 80406 univention-directory-manager-modules (12.0.17-16) * Bug #43395: Fix udm property default handling ------- r 80408 univention-directory-manager-modules (12.0.17-17) * Bug #43395: Fix pyflakes warnings (In reply to Johannes Keiser from comment #3) > r 80408 > univention-directory-manager-modules (12.0.17-17) > * Bug #43395: Fix pyflakes warnings Please revert this as there is a lot of intentional behavior: The imports are necessary. object.has_key() is different to foo in object, see Bug #42787. This bug is now triggered in UMC when trying to modify the LDAP base. It is now hit because of the changes in Bug #41053. Execution of command 'udm/get navigation' has failed: Traceback (most recent call last): File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 483, in _get if obj.has_key(name) and obj.descriptions[name].default(obj): # noqa: W601 File "%PY2.7%/univention/admin/__init__.py", line 283, in default self.base_default[i] = self._replace(self.base_default[i], object) TypeError: 'tuple' object does not support item assignment We removed univention-directory-manager-modules/test/ during Bug #27286. Could you move the unit tests into an ucs-test case? (In reply to Florian Best from comment #4) > (In reply to Johannes Keiser from comment #3) > > r 80408 > > univention-directory-manager-modules (12.0.17-17) > > * Bug #43395: Fix pyflakes warnings > > Please revert this as there is a lot of intentional behavior: > The imports are necessary. > object.has_key() is different to foo in object, see Bug #42787. r 80409 univention-directory-manager-modules (12.0.17-18) * Bug #43395: Revert commit r 80408 (In reply to Florian Best from comment #6) > We removed univention-directory-manager-modules/test/ during Bug #27286. > Could you move the unit tests into an ucs-test case? r 80410 univention-directory-manager-modules (12.0.17-19) * Bug #43395: Move duplicated code into function and remove unittest r 80411 Added test to ucs-test YAML: r 80416 OK: patch works nice OK: ucs-test OK: YAML <http://errata.software-univention.de/ucs/4.2/74.html> <http://errata.software-univention.de/ucs/4.2/75.html> Reported again, 4.2-0 errata85 (Lesum) - UCS@school 4.2 v1 |