Mails are sent by the cron, not by the script
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
f8feff7c55
commit
076e1f0013
|
@ -1,6 +1,6 @@
|
||||||
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
|
# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
from django.core.mail import send_mail
|
|
||||||
from django.core.management import BaseCommand
|
from django.core.management import BaseCommand
|
||||||
from django.db.models import Sum, F
|
from django.db.models import Sum, F
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ class Command(BaseCommand):
|
||||||
parser.add_argument('--check-all', '-a', action='store_true', help='Check all notes')
|
parser.add_argument('--check-all', '-a', action='store_true', help='Check all notes')
|
||||||
parser.add_argument('--check', '-c', type=int, nargs='+', help='Select note ids')
|
parser.add_argument('--check', '-c', type=int, nargs='+', help='Select note ids')
|
||||||
parser.add_argument('--fix', '-f', action='store_true', help='Fix note balances')
|
parser.add_argument('--fix', '-f', action='store_true', help='Fix note balances')
|
||||||
parser.add_argument('--mail', '-m', action='store_true', help='Send mail to admins if there is an error')
|
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
error = False
|
error = False
|
||||||
|
|
Loading…
Reference in New Issue