From 929672a2a97d22d379ed8ecd811313dd38ec8664 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Tue, 8 Nov 2016 10:41:12 -0200 Subject: [PATCH] check date admin --- bda/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bda/admin.py b/bda/admin.py index 87a269d4..a9b3c51f 100644 --- a/bda/admin.py +++ b/bda/admin.py @@ -257,7 +257,8 @@ class SpectacleReventeAdmin(admin.ModelAdmin): RĂ©initialise les reventes. """ count = queryset.count() - for revente in queryset.all(): + for revente in queryset.filter( + attribution__spectacle__date__gte=timezone.now()): revente.date = timezone.now() - timedelta(hours=1) revente.soldTo = None revente.notif_sent = False