From 065a8c1007ad277d465628278a7b4531e09bc869 Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Thu, 20 Jan 2022 10:30:39 +0100 Subject: [PATCH] dataviz: avoid crash in spooler if cell was deleted (#60857) --- combo/utils/spooler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/combo/utils/spooler.py b/combo/utils/spooler.py index 179e0868..347cdc58 100644 --- a/combo/utils/spooler.py +++ b/combo/utils/spooler.py @@ -97,5 +97,8 @@ def refresh_statistics_list(): def refresh_statistics_data(cell_pk): from combo.apps.dataviz.models import ChartNgCell - cell = ChartNgCell.objects.get(pk=cell_pk) + try: + cell = ChartNgCell.objects.get(pk=cell_pk) + except ChartNgCell.DoesNotExist: + return cell.get_statistic_data(invalidate_cache=True) -- 2.30.2