mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
when aging, use a more compact age to stay within username 30 char restriction
This commit is contained in:
parent
a8f5eff0ae
commit
bd61261454
@ -88,9 +88,13 @@ class Command(BaseCommand):
|
||||
print('unable to find deleted timestamp in %s field' % name_field)
|
||||
else:
|
||||
aged_date = dt - datetime.timedelta(days=self.days)
|
||||
setattr(instance, name_field, name_prefix + aged_date.isoformat() + name_append)
|
||||
if model is User:
|
||||
aged_ts_append = aged_date.strftime('%Y-%m-%dT%H:%M:%S.%f')
|
||||
else:
|
||||
aged_ts_append = aged_date.isoformat() + name_append
|
||||
setattr(instance, name_field, name_prefix + aged_ts_append)
|
||||
instance.save()
|
||||
#print("Aged %s" % instance.name)
|
||||
#print("Aged %s" % getattr(instance, name_field))
|
||||
n_aged_items += 1
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user