Browse Source

use Library.granted_date in sendmails command

master
Benni Baermann 4 years ago
parent
commit
0ce0151b16
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      input/management/commands/sendmails.py

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

@ -46,7 +46,6 @@ class Command(BaseCommand):
def end_of_projects_reached(self):
''' end of project reached '''
# get all projects which ended
# - timedelta(days=21))
old = Project.objects.filter(end__lt = date.today())\
.exclude(end_mail_send = True)
@ -73,7 +72,9 @@ class Command(BaseCommand):
self.end_of_projects_reached()
# get all library objects which where granted two weeks ago
supported = Library.objects.filter(granted=True)\
.filter(granted_date__lt = date.today() - timedelta(days=14))\
.exclude(survey_mail_send=True)
print(supported)
for item in supported:

Loading…
Cancel
Save