From 8e104b7efcbd19cb1278f931678e3268f57247a2 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Thu, 1 Dec 2022 13:57:04 +0100 Subject: [PATCH] Fixes resubmission handling * resubmissions have not been deleted after sending mails --- konova/management/commands/handle_resubmissions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/konova/management/commands/handle_resubmissions.py b/konova/management/commands/handle_resubmissions.py index 047dbd5c..65954a3a 100644 --- a/konova/management/commands/handle_resubmissions.py +++ b/konova/management/commands/handle_resubmissions.py @@ -39,6 +39,9 @@ class Command(BaseKonovaCommand): for obj in all_objs: obj.resubmit() self._write_success("Mails have been sent.") + resubmissions = Resubmission.objects.filter( + resubmission_sent=True, + ) resubmissions.delete() self._write_success("Resubmissions have been deleted.") except KeyboardInterrupt: