[sysadmin-bin] Send the reminder on the 1st day of the month



commit 9779da7b930c6e6aa9b1c0ef03b747c9a0acaeb5
Author: Andrea Veri <averi redhat com>
Date:   Tue Mar 19 12:39:01 2019 +0100

    Send the reminder on the 1st day of the month
    
    This to avoid Foundation members that had their membership expired
    within the first 15 days of the month to not appear on the actual
    reminder itself (as their foundation LDAP group membership gets dropped
    once that happens).

 membership/foundation-operations.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index 01a483d..dfeef8d 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -99,7 +99,7 @@ def remove_expired_memberships_from_foundation():
             glu.remove_user_from_ldap_group(member, 'foundation')
             send_form_letters(expired_membership_form_letter, mail_attr, common_name_attr, 
last_renewed_on_attr)
 
-        if (last_renewed_on.year == (today - delta_2y).year) and (last_renewed_on.month == today.month) and 
(today.day == 15):
+        if (last_renewed_on.year == (today - delta_2y).year) and (last_renewed_on.month == today.month) and 
(today.day == 1):
            members_list += common_name_attr + ', ' + last_renewed_on_attr + '\n'
 
     if len(members_list) > 0:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]