Commit 5a1a7a90 authored by Flavio TARSETTI's avatar Flavio TARSETTI

[accounts] changed description/variable name

parent 42051058
Pipeline #35965 passed with stage
in 12 minutes and 55 seconds
......@@ -44,7 +44,7 @@ import random
class Command(BaseCommand):
help = 'Cleanup outdated invalid users'
help = 'Postpone user(s) validation process'
def add_arguments(self, parser):
parser.add_argument('--noinput', action='store_false', dest='interactive', default=False,
......@@ -77,8 +77,8 @@ class Command(BaseCommand):
supervisiontracks = SupervisionTrack.objects.filter(supervision_key=invalid_profile.supervision_key)
registration_profiles = RegistrationProfile.objects.filter(user=invalid_profile.user)
expiration_date = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
if user.profile.registration_date + expiration_date <= now:
expiration_date_delta = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
if user.profile.registration_date + expiration_date_delta <= now:
count += 1
user.delete()
invalid_profile.delete()
......@@ -92,8 +92,8 @@ class Command(BaseCommand):
supervisiontracks = SupervisionTrack.objects.filter(supervision_key=invalid_profile.supervision_key)
registration_profiles = RegistrationProfile.objects.filter(user=invalid_profile.user)
expiration_date = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS_FROM_SUPERVISOR)
if user.profile.registration_date + expiration_date <= now:
expiration_date_delta = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS_FROM_SUPERVISOR)
if user.profile.registration_date + expiration_date_delta <= now:
count += 1
user.delete()
invalid_profile.delete()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment