fix update carga vigente anterior

francisco/photos
Francisco Sandoval 2024-02-05 09:41:42 -03:00
parent 046fd431a9
commit 64bd566a8a
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class Command(BaseCommand):
print(f'procesa: {filepath}') print(f'procesa: {filepath}')
procesa_zip(filepath) procesa_zip(filepath)
registro_anterior = GtfsArchivo.objects.filter(vigente=True, id_red = red.id_red) registro_anterior = GtfsArchivo.objects.filter(vigente=True, id_red = red.id_red).first()
if registro_anterior: if registro_anterior:
registro_anterior.vigente = False registro_anterior.vigente = False
registro_anterior.save() registro_anterior.save()