From 6d6d9de37968e2eea84bafe5fb4f0985f8d359f9 Mon Sep 17 00:00:00 2001 From: James Laska Date: Sat, 20 Jun 2015 13:47:09 -0400 Subject: [PATCH] Use the proper attr when saving instance name Fixes: https://trello.com/c/24OoIyyf --- awx/main/management/commands/age_deleted.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/management/commands/age_deleted.py b/awx/main/management/commands/age_deleted.py index 66a1a69ed6..6a6f0ef651 100644 --- a/awx/main/management/commands/age_deleted.py +++ b/awx/main/management/commands/age_deleted.py @@ -88,7 +88,7 @@ class Command(BaseCommand): print('unable to find deleted timestamp in %s field' % name_field) else: aged_date = dt - datetime.timedelta(days=self.days) - instance.name = name_prefix + aged_date.isoformat() + name_append + setattr(instance, name_field, name_prefix + aged_date.isoformat() + name_append) instance.save() #print("Aged %s" % instance.name) n_aged_items += 1