diff --git a/management/commands/send_reports.py b/management/commands/send_reports.py index c1dae04..8112aeb 100644 --- a/management/commands/send_reports.py +++ b/management/commands/send_reports.py @@ -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(),