Update last report date only in non-debug mode
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
7676f69216
commit
13322189dc
|
@ -33,6 +33,7 @@ class Command(BaseCommand):
|
||||||
delta = now.date() - last_report.date()
|
delta = now.date() - last_report.date()
|
||||||
if delta.days < note.user.profile.report_frequency:
|
if delta.days < note.user.profile.report_frequency:
|
||||||
continue
|
continue
|
||||||
|
if not options["debug"]:
|
||||||
note.user.profile.last_report = now
|
note.user.profile.last_report = now
|
||||||
note.user.profile.save()
|
note.user.profile.save()
|
||||||
last_transactions = Transaction.objects.filter(
|
last_transactions = Transaction.objects.filter(
|
||||||
|
|
Loading…
Reference in New Issue