check date spectacle
This commit is contained in:
parent
a29c73cb27
commit
76a88be4ef
1 changed files with 6 additions and 5 deletions
11
bda/views.py
11
bda/views.py
|
@ -331,11 +331,12 @@ def revente(request, tirage_id):
|
||||||
id=revente_id)
|
id=revente_id)
|
||||||
if rev.exists():
|
if rev.exists():
|
||||||
revente = rev.get()
|
revente = rev.get()
|
||||||
revente.date = timezone.now() - timedelta(hours=1)
|
if revente.attribution.spectacle.date > timezone.now():
|
||||||
revente.soldTo = None
|
revente.date = timezone.now() - timedelta(hours=1)
|
||||||
if revente.answered_mail:
|
revente.soldTo = None
|
||||||
revente.answered_mail.clear()
|
if revente.answered_mail:
|
||||||
revente.save()
|
revente.answered_mail.clear()
|
||||||
|
revente.save()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
resellform = ResellForm(participant, prefix='resell')
|
resellform = ResellForm(participant, prefix='resell')
|
||||||
|
|
Loading…
Reference in a new issue