mirror of
https://gitlab.crans.org/bde/nk20-scripts
synced 2024-12-25 00:42:23 +00:00
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,8 +33,9 @@ class Command(BaseCommand):
|
||||
delta = now.date() - last_report.date()
|
||||
if delta.days < note.user.profile.report_frequency:
|
||||
continue
|
||||
note.user.profile.last_report = now
|
||||
note.user.profile.save()
|
||||
if not options["debug"]:
|
||||
note.user.profile.last_report = now
|
||||
note.user.profile.save()
|
||||
last_transactions = Transaction.objects.filter(
|
||||
Q(source=note) | Q(destination=note),
|
||||
created_at__gte=last_report,
|
||||
|
Loading…
Reference in New Issue
Block a user