Add a kind of trashbin for registrations and participants
All checks were successful
buildbot/tox Build done.
All checks were successful
buildbot/tox Build done.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import logging
|
||||
from django.utils import timezone
|
||||
|
||||
from .models import Participant
|
||||
from .models import Participant, TrashedParticipant
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -11,3 +11,6 @@ def purge_participants():
|
||||
for p in Participant.objects.filter(purge_at__lte=now):
|
||||
logger.info('Purge participant \'%s\'', p)
|
||||
p.delete()
|
||||
for p in TrashedParticipant.objects.filter(purge_at__lte=now):
|
||||
logger.info('Purge participant from trash \'%s\'', p)
|
||||
p.delete()
|
||||
|
||||
Reference in New Issue
Block a user