diff options
-rw-r--r-- | ipalib/plugins/pwpolicy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py index a10d07d4e..9580d1574 100644 --- a/ipalib/plugins/pwpolicy.py +++ b/ipalib/plugins/pwpolicy.py @@ -53,9 +53,9 @@ def _convert_time_for_output(entry_attrs): def _convert_time_on_input(entry_attrs): # Convert hours and days to seconds for writing to LDAP - if 'krbmaxpwdlife' in entry_attrs: + if 'krbmaxpwdlife' in entry_attrs and entry_attrs['krbmaxpwdlife']: entry_attrs['krbmaxpwdlife'] = entry_attrs['krbmaxpwdlife'] * 86400 - if 'krbminpwdlife' in entry_attrs: + if 'krbminpwdlife' in entry_attrs and entry_attrs['krbminpwdlife']: entry_attrs['krbminpwdlife'] = entry_attrs['krbminpwdlife'] * 3600 def find_group_dn(group): |