Univention Bugzilla – Bug 54017
Simple UDM API: Do not raise WrongObjectType during iteration in search()
Last modified: 2021-11-02 13:24:17 CET
If an object has the wrong object type, the simple UDM API refuses to use it. It raises a WrongObjectTypeError. This is done because no guarantees can be made for that object. This happens, if e.g., a share object has the "objectClass: univentionGroup". It is found by the group handler, but as the object itself is no group upon second look, the API will raise the error. This makes sense in get(). But in search(), it leads to non-working errors during udm.get('groups/group').search() with no sane possibility to recover.
univention-directory-manager-rest.yaml 086f5b66bcd2 | Bug #54017: YAML univention-directory-manager-modules (14.0.20-26) 4c5c50ecb01f | Bug #54017: Do not raise WrongObjectType during search()
(In reply to Dirk Wiesenthal from comment #1) > univention-directory-manager-rest.yaml > 086f5b66bcd2 | Bug #54017: YAML REOPEN: Wrong YAML, messed up the previously existing entry.
Your LDAP data are invalid. You have a share with wrong data: ``` objectClass: univentionOffice365 objectClass: univentionGroup objectClass: ucsschoolGroup univentionOffice365ADConnectionAlias: ama ``` All of those attributes are wrong for a shares/share object.
At first I was unhappy with the implementation: silently ignoring an exception. I thought at least a log entry that an object was skipped should be made. But after a while I have decided that it's OK to do that in this case, as the library user has used the "search()" method on an explicitly requested UDM module. And thus she simply wouldn't won't to get objects of other modules, meaning she wouldn't need a log entry for something that she never wanted. So I'm happy with the solution of silently ignoring the exception.
/won't/want/