summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2012-04-12 07:29:21 -0400
committerMartin Kosek <mkosek@redhat.com>2012-04-18 09:04:02 +0200
commit2a27e0bd2067e380c8c7f0652b694a54a495f82d (patch)
treee9b89eae6c0cadf7b9750050038d7ac98dd1421e
parent49f869522581d66a62e7d251739a2f758837d78e (diff)
downloadfreeipa.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.py2
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]):