summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins
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:03:53 +0200
commitc043a65728ec897a31373e0ebe00f52ac8978dc1 (patch)
tree7a64a83581fba0ff00cfeba8f05eea46522ae8f4 /ipalib/plugins
parent88927fb78b5dd8df6fdccb79c84c02691c7aeb46 (diff)
downloadfreeipa-c043a65728ec897a31373e0ebe00f52ac8978dc1.tar.gz
freeipa-c043a65728ec897a31373e0ebe00f52ac8978dc1.tar.xz
freeipa-c043a65728ec897a31373e0ebe00f52ac8978dc1.zip
Fix internal error when renaming user with an empty string.
ticket 2629
Diffstat (limited to 'ipalib/plugins')
-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 5b20984c4..64286555b 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]):