Test alert when someone goes overdue
This commit is contained in:
parent
e809299ca1
commit
066dcd6a30
|
@ -104,6 +104,8 @@ def tally_membership_months(member, fake_date=None):
|
|||
status = calc_member_status(expire_date, fake_date)
|
||||
|
||||
if member.expire_date != expire_date or member.status != status:
|
||||
previous_status = member.status
|
||||
|
||||
member.expire_date = expire_date
|
||||
member.status = status
|
||||
|
||||
|
@ -113,6 +115,11 @@ def tally_membership_months(member, fake_date=None):
|
|||
alert_tanner(msg)
|
||||
logger.info(msg)
|
||||
|
||||
if status == 'Overdue' and previous_status == 'Due':
|
||||
msg = 'Member has become Overdue: {} {}'.format(member.preferred_name, member.last_name)
|
||||
alert_tanner(msg)
|
||||
logger.info(msg)
|
||||
|
||||
member.save()
|
||||
logging.debug('Tallied %s membership months: updated.', member)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user