From d5f7256ec5925ffc4cf324c936e1312ac6318a7c Mon Sep 17 00:00:00 2001 From: Xavier Fiechter Date: Fri, 6 Dec 2024 15:13:17 +0100 Subject: [PATCH] . --- django/labellabor/views.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/django/labellabor/views.py b/django/labellabor/views.py index 3c4ced7..2301308 100644 --- a/django/labellabor/views.py +++ b/django/labellabor/views.py @@ -916,6 +916,13 @@ class ExampleSecretView(OTPRequiredMixin, TemplateView): class OutputStatUpdateRedirectView(View): def get(self, request, output_stats_id, label_id): + if not output_stats_id: + messages.add_message( + request, + messages.ERROR, + "Hmmmm.... Not ready yet. Please retry in a few seconds." + ) + return redirect('edit_label', pk=label_id) try: output_stat = OutputStat.objects.get(id=output_stats_id) except OutputStat.DoesNotExist: