From ae95462c52789454d28c6a86225197b015309e93 Mon Sep 17 00:00:00 2001 From: Flavio Tarsetti <flavio.tarsetti@idiap.ch> Date: Thu, 8 Jun 2017 18:52:13 +0200 Subject: [PATCH] [accounts/utils - management] added daily cron actions to clean invalid users - no input default --- beat/web/accounts/management/commands/clean_invalid_users.py | 2 +- beat/web/utils/management/commands/daily_cron_actions.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/beat/web/accounts/management/commands/clean_invalid_users.py b/beat/web/accounts/management/commands/clean_invalid_users.py index eef2dcffb..5b2308ba4 100644 --- a/beat/web/accounts/management/commands/clean_invalid_users.py +++ b/beat/web/accounts/management/commands/clean_invalid_users.py @@ -47,7 +47,7 @@ class Command(BaseCommand): help = 'Cleanup outdated invalid users' def add_arguments(self, parser): - parser.add_argument('--noinput', action='store_false', dest='interactive', default=True, + parser.add_argument('--noinput', action='store_false', dest='interactive', default=False, help=('Tells Django to NOT prompt the user for input of any kind.')) diff --git a/beat/web/utils/management/commands/daily_cron_actions.py b/beat/web/utils/management/commands/daily_cron_actions.py index d92e73685..34bcd0140 100644 --- a/beat/web/utils/management/commands/daily_cron_actions.py +++ b/beat/web/utils/management/commands/daily_cron_actions.py @@ -52,3 +52,6 @@ class Command(BaseCommand): # Send report cleanup warnings and cleanup reports call_command('send_report_cleanup_warning_and_cleanup') + + # Clean and remove invalid users + call_command('clean_invalid_users') -- GitLab