# -*- coding: utf-8 -*-

from django.core.management.base import BaseCommand

from membership.models import ActivationRequest


class Command(BaseCommand):
    help = "Delete all expired user registrations from the database"

    def handle(self, *args, **options):
        for activation in ActivationRequest.objects.expired():
            activation.user.delete()

