diff --git a/smash/web/views/notifications.py b/smash/web/views/notifications.py index 58e305a63de108a643a78647bfa5fd122dfb4de3..aa56fe879701094a32241315203628b61305e01b 100644 --- a/smash/web/views/notifications.py +++ b/smash/web/views/notifications.py @@ -171,8 +171,10 @@ def get_subjects_with_no_visit(user): def get_subjects_with_almost_expired_vouchers(user): - notification_min_date = get_today_midnight_date() + datetime.timedelta(days=14) - contact_attempt_min_date = get_today_midnight_date() - datetime.timedelta(days=14) + # if expiry date is in the next 7 days + notification_min_date = get_today_midnight_date() + datetime.timedelta(days=7) + # if last successful contact was over 7 days ago + contact_attempt_min_date = get_today_midnight_date() - datetime.timedelta(days=7) result = StudySubject.objects.filter( subject__dead=False, resigned=False,