Univention Bugzilla – Attachment 8219 Details for
Bug 42928
Trying to create an existing group does not raise udm_errors.objectExists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
42928.patch (text/plain), 830 bytes, created by
Florian Best
on 2016-11-11 11:15:37 CET
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-11-11 11:15:37 CET
Size:
830 bytes
patch
obsolete
>diff --git a/management/univention-appcenter/python/appcenter/udm.py b/management/univention-appcenter/python/appcenter/udm.py >index f078f68..b2501cf 100644 >--- a/management/univention-appcenter/python/appcenter/udm.py >+++ b/management/univention-appcenter/python/appcenter/udm.py >@@ -88,12 +88,14 @@ def create_object_if_not_exists(module, lo, pos, **kwargs): > if 'policies' in kwargs: > obj.policies = kwargs.pop('policies') > for key, value in kwargs.iteritems(): >- obj.info[key] = value >+ obj[key] = value >+ dn = obj._ldap_dn() > try: >+ existing_obj = init_object(module, lo, pos, dn) >+ if not existing_obj.exists(): # workaround for Bug #38110, will be fixed in UCS 4.2 >+ raise udm_errors.noObject(dn) >+ except udm_errors.noObject: > obj.create() >- except udm_errors.objectExists: >- pass >- else: > return obj > >
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 42928
: 8219