diff --git a/awx/main/management/commands/age_deleted.py b/awx/main/management/commands/age_deleted.py index 6a6f0ef651..02d1515347 100644 --- a/awx/main/management/commands/age_deleted.py +++ b/awx/main/management/commands/age_deleted.py @@ -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