diff options
author | Petr Viktorin <pviktori@redhat.com> | 2012-05-02 12:36:15 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-05-09 09:53:51 +0200 |
commit | c02fcf5d34ad880e082cbc0c7f59fc3812d11c9e (patch) | |
tree | f923c0ec6015028ca174687e3d197182ca12d8bc /ipalib/plugins | |
parent | d9d196798945bef7a955acb8b71820800455be17 (diff) | |
download | freeipa-c02fcf5d34ad880e082cbc0c7f59fc3812d11c9e.tar.gz freeipa-c02fcf5d34ad880e082cbc0c7f59fc3812d11c9e.tar.xz freeipa-c02fcf5d34ad880e082cbc0c7f59fc3812d11c9e.zip |
Don't fail when adding default objectclasses using config-mod
The config plugin was adding together a list and a tuple, then
converting to a set.
Replace the operation with a set union.
Regression test included.
https://fedorahosted.org/freeipa/ticket/2706
Diffstat (limited to 'ipalib/plugins')
-rw-r--r-- | ipalib/plugins/config.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/config.py b/ipalib/plugins/config.py index df960f4c0..30f26addf 100644 --- a/ipalib/plugins/config.py +++ b/ipalib/plugins/config.py @@ -229,8 +229,8 @@ class config_mod(LDAPUpdate): if not entry_attrs[attr]: raise errors.ValidationError(name=attr, error=_('May not be empty')) - objectclasses = list(set(entry_attrs[attr] \ - + self.api.Object[obj].possible_objectclasses)) + objectclasses = list(set(entry_attrs[attr]).union( + self.api.Object[obj].possible_objectclasses)) new_allowed_attrs = ldap.get_allowed_attributes(objectclasses, raise_on_unknown=True) checked_attrs = self.api.Object[obj].default_attributes |