From 410e2574d1c9635e50d69a096d7493627cf89a56 Mon Sep 17 00:00:00 2001 From: Vishnu Ks Date: Wed, 21 Feb 2018 22:51:50 +0530 Subject: [PATCH] settings: Remove unused setting ACCOUNT_ACTIVATION_DAYS. ACCOUNT_ACTIVATION_DAYS doesn't seems to be used anywhere. INVITATION_LINK_VALIDITY_DAYS seems to do it's job currently. (It was only ever used in very early Zulip commits). --- zerver/lib/actions.py | 2 +- zerver/tests/test_signup.py | 2 +- zproject/settings.py | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index ec2bb9860a..42641b8d09 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -4887,7 +4887,7 @@ def do_invite_users(user_profile: UserProfile, notify_invites_changed(user_profile) def do_get_user_invites(user_profile: UserProfile) -> List[Dict[str, Any]]: - days_to_activate = getattr(settings, 'ACCOUNT_ACTIVATION_DAYS', 7) + days_to_activate = settings.INVITATION_LINK_VALIDITY_DAYS active_value = getattr(confirmation_settings, 'STATUS_ACTIVE', 1) lowest_datetime = timezone_now() - datetime.timedelta(days=days_to_activate) diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py index 18786fe796..38833ea33e 100644 --- a/zerver/tests/test_signup.py +++ b/zerver/tests/test_signup.py @@ -1255,7 +1255,7 @@ class InvitationsTestCase(InviteUserBase): A GET call to /json/invites returns all unexpired invitations. """ - days_to_activate = getattr(settings, 'ACCOUNT_ACTIVATION_DAYS', "Wrong") + days_to_activate = getattr(settings, 'INVITATION_LINK_VALIDITY_DAYS', "Wrong") active_value = getattr(confirmation_settings, 'STATUS_ACTIVE', "Wrong") self.assertNotEqual(days_to_activate, "Wrong") self.assertNotEqual(active_value, "Wrong") diff --git a/zproject/settings.py b/zproject/settings.py index 05258dd971..c8ece2ab2e 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -1267,8 +1267,6 @@ LOGGING = { } } -ACCOUNT_ACTIVATION_DAYS = 7 - LOGIN_REDIRECT_URL = '/' # Client-side polling timeout for get_events, in milliseconds.