From: Guillaume Pellerin Date: Mon, 15 Feb 2021 10:11:05 +0000 (+0100) Subject: bugfix X-Git-Tag: 1.4.3~29^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d32e4efc4c8ff6fe6a253414e4da41c0667586a2;p=teleforma.git bugfix --- diff --git a/teleforma/management/commands/teleforma-delete-jqchat-messages.py b/teleforma/management/commands/teleforma-delete-jqchat-messages.py index c281d537..f80dad82 100644 --- a/teleforma/management/commands/teleforma-delete-jqchat-messages.py +++ b/teleforma/management/commands/teleforma-delete-jqchat-messages.py @@ -14,7 +14,7 @@ class Command(BaseCommand): date_now = datetime.datetime.now() date_old = date_now.replace(year=date_now.year-1) print(date_old) - messages = Message.objects.filter(created__lte=date) + messages = Message.objects.filter(created__lte=date_old) print(messages.count()) for message in messages: message.delete()