Fix note list when daily reports are sent

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-04-08 17:33:16 +02:00
parent 8ec7d68a16
commit 7676f69216
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@ class Command(BaseCommand):
def handle(self, *args, **options):
activate('fr')
if "notes" in options:
notes = NoteUser.objects.filter(pk__in=options["notes"]).all()
if 'notes' in options and options['notes']:
notes = NoteUser.objects.filter(pk__in=options['notes']).all()
else:
notes = NoteUser.objects.filter(
user__memberships__date_end__gte=timezone.now(),