mirror of
https://gitlab.crans.org/bde/nk20-scripts
synced 2025-06-29 01:40:55 +02:00
🐛 Last report date is a datetime, not a date
This commit is contained in:
@ -23,10 +23,10 @@ class Command(BaseCommand):
|
||||
for note in notes:
|
||||
now = timezone.now()
|
||||
last_report = note.user.profile.last_report
|
||||
delta = now.date() - last_report
|
||||
delta = now.date() - last_report.date()
|
||||
if delta.days < note.user.profile.report_frequency:
|
||||
continue
|
||||
note.user.profile.last_report = now.date()
|
||||
note.user.profile.last_report = now
|
||||
note.user.profile.save()
|
||||
last_transactions = Transaction.objects.filter(
|
||||
Q(source=note) | Q(destination=note),
|
||||
|
Reference in New Issue
Block a user