Univention Bugzilla – Attachment 6695 Details for
Bug 34970
Working groups with alien students have issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Catch noObject exception
bug34970.patch (text/plain), 1.05 KB, created by
Sönke Schwardt-Krummrich
on 2015-02-18 16:28:20 CET
(
hide
)
Description:
Catch noObject exception
Filename:
MIME Type:
Creator:
Sönke Schwardt-Krummrich
Created:
2015-02-18 16:28:20 CET
Size:
1.05 KB
patch
obsolete
>--- a/ucs-school-4.0/ucs-school-umc-groups/umc/python/schoolgroups/__init__.py >+++ b/ucs-school-4.0/ucs-school-umc-groups/umc/python/schoolgroups/__init__.py >@@ -166,13 +166,18 @@ class Instance( SchoolBaseModule ): > user_mod = udm_modules.get( 'users/user' ) > members = [] > for member_dn in memberDNs: >- user = udm_objects.get( user_mod, None, ldap_user_read, ldap_position, member_dn ) >+ try: >+ user = univention.admin.modules.lookup(user_mod, None, ldap_user_read, scope='base', base=member_dn)[0] >+ except udm_exceptions.noObject as exc: >+ MODULE.process('get(): skipped foreign OU user %r' % (member_dn,)) >+ continue > if not user: > continue > try: > user.open() > except udm_exceptions.noObject as exc: >- MODULE.process('Skipped foreign OU user %r' % (member_dn,)) >+ strTraceback = traceback.format_exc() >+ MODULE.error('get(): failed to open user object: %r\nTRACEBACK:%s' % (member_dn, strTraceback)) > continue > members.append( { 'id' : user.dn, 'label' : Display.user( user ) } ) > result[ 'members' ] = members
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 34970
: 6695