]> git.parisson.com Git - teleforma.git/commitdiff
bugfix
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 15 Feb 2021 10:11:05 +0000 (11:11 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 15 Feb 2021 10:11:05 +0000 (11:11 +0100)
teleforma/management/commands/teleforma-delete-jqchat-messages.py

index c281d537d799dd29b6e3f468d093c07cf853aa68..f80dad82d146db94fa4dd1c9e6bf4d9a4044c7e2 100644 (file)
@@ -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()