From c043a65728ec897a31373e0ebe00f52ac8978dc1 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 12 Apr 2012 07:29:21 -0400 Subject: Fix internal error when renaming user with an empty string. ticket 2629 --- ipalib/plugins/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib/plugins/user.py') 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]): -- cgit