Index: modules/univention/s4connector/__init__.py =================================================================== --- modules/univention/s4connector/__init__.py (Revision 81063) +++ modules/univention/s4connector/__init__.py (Arbeitskopie) @@ -914,11 +914,23 @@ else: searchdn = unicode(dn) try: - if not self.get_ucs_ldap_object(searchdn): # fails if object doesn't exist + old = self.get_ucs_ldap_object(searchdn) + if not old: ud.debug(ud.LDAP, ud.INFO, "get_ucs_object: object not found: %s" % searchdn) return None - module = self.modules[property_type] - ucs_object = univention.admin.objects.get(module, co='', lo=self.lo, position='', dn=searchdn) # does not fail if object doesn't exist + + module = self.modules[property_type] # old default + if not module.identify(unicode(dn, 'utf8'), old): + if self.modules_others[property_type]: + for m in self.modules_others[property_type]: + if m and m.identify(unicode(dn, 'utf8'), old): + module = m + break + else: + ud.debug(ud.LDAP, ud.ERROR, "get_ucs_object: could not identify UDM object type: %s" % searchdn) + ud.debug(ud.LDAP, ud.PROCESS, "get_ucs_object: using default: %s" % module.module) + + ucs_object = univention.admin.objects.get(module, co='', lo=self.lo, position='', dn=searchdn) ud.debug(ud.LDAP, ud.INFO, "get_ucs_object: object found: %s" % searchdn) except (ldap.SERVER_DOWN, SystemExit): raise