mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix #41044; allow for date param to be 0
This commit is contained in:
parent
d89c317d96
commit
a81a6fe23c
1 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ def _changes(name,
|
|||
workphone='',
|
||||
homephone='',
|
||||
loginclass=None,
|
||||
date=0,
|
||||
date=None,
|
||||
mindays=0,
|
||||
maxdays=999999,
|
||||
inactdays=0,
|
||||
|
@ -134,7 +134,7 @@ def _changes(name,
|
|||
change['passwd'] = password
|
||||
if empty_password and lshad['passwd'] != '':
|
||||
change['empty_password'] = True
|
||||
if date and date is not 0 and lshad['lstchg'] != date:
|
||||
if date is not None and lshad['lstchg'] != date:
|
||||
change['date'] = date
|
||||
if mindays and mindays is not 0 and lshad['min'] != mindays:
|
||||
change['mindays'] = mindays
|
||||
|
@ -675,7 +675,7 @@ def present(name,
|
|||
'empty password'.format(name)
|
||||
ret['result'] = False
|
||||
ret['changes']['password'] = ''
|
||||
if date:
|
||||
if date is not None:
|
||||
__salt__['shadow.set_date'](name, date)
|
||||
spost = __salt__['shadow.info'](name)
|
||||
if spost['lstchg'] != date:
|
||||
|
|
Loading…
Add table
Reference in a new issue