Update applications_example_data.py
@@ -208,6 +208,16 @@ class Command(BaseCommand):
for app_to_renew in random.sample(list(all_apps), num_to_renew):
app_to_renew.renew()
+ for application in Application.objects.filter(status=Application.PENDING, parent__isnull=False):
+ parent_application = Application.objects.get(pk=application.parent)
+ app_date = parent_application.date_closed
+
+ renewal_date = Faker(
+ random.choice(settings.FAKER_LOCALES)
+ ).date_time_between(start_date=app_date, end_date="now", tzinfo=None)
+ application.date_created = renewal_date
+ application.save()
+
def chance(self, selected, default, chance):
# A percentage chance to select something, otherwise selects
# the default option. Used to generate data that's more
