mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
Merge pull request #291 from chrismeyersfsu/fix-age_deleted
when aging, use a more compact age to stay within username 30 char restriction
This commit is contained in:
commit
b7411f67f6
@ -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…
x
Reference in New Issue
Block a user