From 8b4e2037833549ee2f21ae37dfb284a3b68f0b4c Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Fri, 17 Apr 2020 19:11:44 +0200 Subject: [PATCH] Reset clean_notyetactive command to its correct state --- users/management/commands/clean_notyetactive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/management/commands/clean_notyetactive.py b/users/management/commands/clean_notyetactive.py index d1857096..14f7c826 100644 --- a/users/management/commands/clean_notyetactive.py +++ b/users/management/commands/clean_notyetactive.py @@ -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()