forked from DGNum/gestioCOF
Use new method in admin
This commit is contained in:
parent
1783196a9c
commit
9a8773978c
2 changed files with 2 additions and 7 deletions
|
@ -288,13 +288,7 @@ class SpectacleReventeAdmin(admin.ModelAdmin):
|
|||
count = queryset.count()
|
||||
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
|
||||
revente.tirage_done = False
|
||||
if revente.confirmed_entry:
|
||||
revente.confirmed_entry.clear()
|
||||
revente.save()
|
||||
revente.reset(new_date=timezone.now() - timedelta(hours=1))
|
||||
self.message_user(
|
||||
request,
|
||||
"%d attribution%s %s été réinitialisée%s avec succès." % (
|
||||
|
|
|
@ -300,6 +300,7 @@ class SpectacleRevente(models.Model):
|
|||
self.confirmed_entry.clear()
|
||||
self.soldTo = None
|
||||
self.notif_sent = False
|
||||
self.notif_time = None
|
||||
self.tirage_done = False
|
||||
self.shotgun = False
|
||||
self.save()
|
||||
|
|
Loading…
Reference in a new issue