From a670467fb39e44568cbaf7962ca66abdc90db190 Mon Sep 17 00:00:00 2001 From: aldbr Date: Wed, 18 Jan 2023 16:34:31 +0100 Subject: [PATCH] sweep: #6694 fix accounting JobsPerPilot plot --- src/DIRAC/AccountingSystem/private/Plotters/PilotPlotter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DIRAC/AccountingSystem/private/Plotters/PilotPlotter.py b/src/DIRAC/AccountingSystem/private/Plotters/PilotPlotter.py index 1a682f18a20..10176ebe9f7 100644 --- a/src/DIRAC/AccountingSystem/private/Plotters/PilotPlotter.py +++ b/src/DIRAC/AccountingSystem/private/Plotters/PilotPlotter.py @@ -186,8 +186,9 @@ def _plotJobsPerPilot(self, reportRequest, plotInfo, filename): "endtime": reportRequest["endTime"], "span": plotInfo["granularity"], "ylabel": "jobs/pilot", - "normalization": max(x for y in plotInfo["data"].values() for x in y.values()), } + if plotInfo["data"]: + metadata["normalization"] = max(x for y in plotInfo["data"].values() for x in y.values()) return self._generateQualityPlot(filename, plotInfo["data"], metadata) def _reportTotalNumberOfPilots(self, reportRequest):