mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 15:33:45 +00:00
Reset clean_notyetactive command to its correct state
This commit is contained in:
parent
bef496b3e2
commit
e323972b96
1 changed files with 2 additions and 2 deletions
|
@ -28,13 +28,13 @@ from django.utils import timezone
|
|||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Delete non members users (not yet active or disabled too long ago without an invoice)."
|
||||
help = "Delete non members users (not yet active)."
|
||||
|
||||
def handle(self, *args, **options):
|
||||
"""First deleting invalid invoices, and then deleting the users"""
|
||||
days = OptionalUser.get_cached_value("disable_emailnotyetconfirmed")
|
||||
users_to_delete = (
|
||||
User.objects.filter(Q(state=User.STATE_NOT_YET_ACTIVE) | Q(state=User.STATE_DISABLED))
|
||||
User.objects.filter(Q(state=User.STATE_NOT_YET_ACTIVE))
|
||||
.filter(registered__lte=timezone.now() - timedelta(days=days))
|
||||
.exclude(facture__valid=True)
|
||||
.distinct()
|
||||
|
|
Loading…
Reference in a new issue