diff --git a/project/api/management/commands/procesa_zip.py b/project/api/management/commands/procesa_zip.py index 5fc5f5f..00cb1c2 100644 --- a/project/api/management/commands/procesa_zip.py +++ b/project/api/management/commands/procesa_zip.py @@ -8,7 +8,6 @@ import csv import zipfile import tempfile import threading -import datetime class Command(BaseCommand): help = 'Procesa los archivos gtfs en formato comprimido (zip)' @@ -16,14 +15,13 @@ class Command(BaseCommand): def handle(self, *args, **options): # Lógica de tu comando aquí folder = config('GTFS_UPLOADS','/tmp') - fecha_hoy = timezone.now().replace(hour=0, minute=0, second=0, microsecond=0) redes = RedTransporte.objects.filter(vigente=True) for red in redes: self.stdout.write(self.style.SUCCESS(f'nombre red: {red.nombre_red}')) gtfs_archivo = GtfsArchivo.objects \ - .filter(vigente=False, id_red = red.id_red, status = 'PENDIENTE', created__gte = fecha_hoy) \ + .filter(vigente=False, id_red = red.id_red, status = 'PENDIENTE') \ .order_by('-created') \ .first()