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

project end not after granted_date
This commit is contained in:
Benni Bärmann 2021-02-08 09:12:56 +01:00
parent 36d56bbfa5
commit 9c23d8bddd
1 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ class Command(BaseCommand):
def surveymails_to_project(self):
'''send survey link 4 weeks after end of project reached'''
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)
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'''
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)
self.surveymails_to_object(supported, type='TRAV', name='request_url')