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)
|
status = calc_member_status(expire_date, fake_date)
|
||||||
|
|
||||||
if member.expire_date != expire_date or member.status != status:
|
if member.expire_date != expire_date or member.status != status:
|
||||||
|
previous_status = member.status
|
||||||
|
|
||||||
member.expire_date = expire_date
|
member.expire_date = expire_date
|
||||||
member.status = status
|
member.status = status
|
||||||
|
|
||||||
|
@ -113,6 +115,11 @@ def tally_membership_months(member, fake_date=None):
|
||||||
alert_tanner(msg)
|
alert_tanner(msg)
|
||||||
logger.info(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()
|
member.save()
|
||||||
logging.debug('Tallied %s membership months: updated.', member)
|
logging.debug('Tallied %s membership months: updated.', member)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user