Browse Source

BUGFIX: survey mails for project and travel should be sent after

project end not after granted_date
master
Benni Baermann 3 years ago
parent
commit
9c23d8bddd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      input/management/commands/sendmails.py

+ 2
- 2
input/management/commands/sendmails.py View File

@ -124,7 +124,7 @@ class Command(BaseCommand):
def surveymails_to_project(self): def surveymails_to_project(self):
'''send survey link 4 weeks after end of project reached''' '''send survey link 4 weeks after end of project reached'''
supported = Project.objects.filter(granted=True)\ supported = Project.objects.filter(granted=True)\
.filter(granted_date__lt = date.today() - timedelta(days=28))\
.filter(end__lt = date.today() - timedelta(days=28))\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)
self.surveymails_to_object(supported, type='PRO', name='realname') self.surveymails_to_object(supported, type='PRO', name='realname')
@ -132,7 +132,7 @@ class Command(BaseCommand):
'''send survey link 3 weeks after end of project reached''' '''send survey link 3 weeks after end of project reached'''
supported = Travel.objects.filter(project__granted=True)\ supported = Travel.objects.filter(project__granted=True)\
.filter(project__granted_date__lt = date.today() - timedelta(days=21))\
.filter(project__end__lt = date.today() - timedelta(days=21))\
.exclude(survey_mail_send=True) .exclude(survey_mail_send=True)
self.surveymails_to_object(supported, type='TRAV', name='request_url') self.surveymails_to_object(supported, type='TRAV', name='request_url')

Loading…
Cancel
Save