soft-deactivation: Rename maybe_catch_up_soft_deactivated_user.

Rename `maybe_catch_up_soft_deactivated_user` to
`reactivate_user_if_soft_deactivated`.
This commit is contained in:
Puneeth Chaganti
2019-03-12 07:18:01 +05:30
committed by Tim Abbott
parent 7f06f6bd73
commit 52afbe5e8d
4 changed files with 8 additions and 8 deletions

View File

@@ -210,7 +210,7 @@ def do_soft_deactivate_users(users: List[UserProfile]) -> List[UserProfile]:
return users_soft_deactivated
def maybe_catch_up_soft_deactivated_user(user_profile: UserProfile) -> Union[UserProfile, None]:
def reactivate_user_if_soft_deactivated(user_profile: UserProfile) -> Union[UserProfile, None]:
if user_profile.long_term_idle:
add_missing_messages(user_profile)
user_profile.long_term_idle = False
@@ -245,7 +245,7 @@ def get_users_for_soft_deactivation(inactive_for_days: int, filter_kwargs: Any)
def do_soft_activate_users(users: List[UserProfile]) -> List[UserProfile]:
users_soft_activated = []
for user_profile in users:
user_activated = maybe_catch_up_soft_deactivated_user(user_profile)
user_activated = reactivate_user_if_soft_deactivated(user_profile)
if user_activated:
users_soft_activated.append(user_activated)
return users_soft_activated