plot: fix no metrics data detection (#4764)

This commit is contained in:
Paweł Redzyński
2020-10-26 20:05:55 +02:00
committed by GitHub
parent 5038fd225b
commit 6cf194f85f
+2 -1
View File
@@ -84,7 +84,8 @@ class Plots:
# If any mentioned plot doesn't have any data then that's an error
targets = [targets] if isinstance(targets, str) else targets or []
for target in targets:
if not any("data" in d[target] for d in data.values()):
rpath = relpath(target, self.repo.root_dir)
if not any("data" in d[rpath] for d in data.values()):
raise NoMetricInHistoryError(target)
# No data at all is a special error with a special message