modernize reventes_shotgun

This commit is contained in:
Ludovic Stephan 2016-12-21 00:35:05 -02:00
parent 257e538621
commit 38dd220c23

View file

@ -468,14 +468,11 @@ def revente_shotgun(request, tirage_id):
date__gte=timezone.now())
shotgun = []
for spectacle in spectacles:
revente_objects = SpectacleRevente.objects.filter(
reventes = SpectacleRevente.objects.filter(
attribution__spectacle=spectacle,
shotgun=True,
soldTo__isnull=True)
revente_count = 0
for revente in revente_objects:
if revente.shotgun:
revente_count += 1
if revente_count:
if reventes.exists():
shotgun.append(spectacle)
return render(request, "bda-shotgun.html",