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):