check date spectacle

This commit is contained in:
Ludovic Stephan 2016-11-08 10:28:00 -02:00
parent a29c73cb27
commit 76a88be4ef

View file

@ -331,11 +331,12 @@ def revente(request, tirage_id):
id=revente_id)
if rev.exists():
revente = rev.get()
revente.date = timezone.now() - timedelta(hours=1)
revente.soldTo = None
if revente.answered_mail:
revente.answered_mail.clear()
revente.save()
if revente.attribution.spectacle.date > timezone.now():
revente.date = timezone.now() - timedelta(hours=1)
revente.soldTo = None
if revente.answered_mail:
revente.answered_mail.clear()
revente.save()
else:
resellform = ResellForm(participant, prefix='resell')