diff options
author | Jan Cholasta <jcholast@redhat.com> | 2012-04-12 07:29:21 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-04-18 09:04:02 +0200 |
commit | 2a27e0bd2067e380c8c7f0652b694a54a495f82d (patch) | |
tree | e9b89eae6c0cadf7b9750050038d7ac98dd1421e | |
parent | 49f869522581d66a62e7d251739a2f758837d78e (diff) | |
download | freeipa.git-2a27e0bd2067e380c8c7f0652b694a54a495f82d.tar.gz freeipa.git-2a27e0bd2067e380c8c7f0652b694a54a495f82d.tar.xz freeipa.git-2a27e0bd2067e380c8c7f0652b694a54a495f82d.zip |
Fix internal error when renaming user with an empty string.
ticket 2629
-rw-r--r-- | ipalib/plugins/user.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index 5b20984c..64286555 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -551,7 +551,7 @@ class user_mod(LDAPUpdate): has_output_params = LDAPUpdate.has_output_params + user_output_params def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): - if 'rename' in options: + if options.get('rename') is not None: config = ldap.get_ipa_config()[1] if 'ipamaxusernamelength' in config: if len(options['rename']) > int(config.get('ipamaxusernamelength')[0]): |