From 1623ae60323179ffa5886bea3a0d27525d940b58 Mon Sep 17 00:00:00 2001 From: Piotr Banaszkiewicz Date: Fri, 10 Nov 2023 20:40:07 +0100 Subject: [PATCH] [#2540] Fix running strategy after update to training progress was made --- amy/trainings/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/amy/trainings/views.py b/amy/trainings/views.py index 8d9108b38..e37f046e2 100644 --- a/amy/trainings/views.py +++ b/amy/trainings/views.py @@ -106,6 +106,7 @@ class TrainingProgressUpdate(RedirectSupportMixin, OnlyForAdminsMixin, AMYUpdate def form_valid(self, form): person = form.cleaned_data["trainee"] event = form.cleaned_data["event"] + result = super().form_valid(form) try: run_instructor_training_completed_not_badged_strategy( instructor_training_completed_not_badged_strategy(person), @@ -118,7 +119,7 @@ def form_valid(self, form): self.request, f"Error when creating or updating scheduled email. {exc}", ) - return super().form_valid(form) + return result class TrainingProgressDelete(RedirectSupportMixin, OnlyForAdminsMixin, AMYDeleteView):