diff --git a/server/website/website/db/base/target_objective.py b/server/website/website/db/base/target_objective.py index 169e499..8b77b21 100644 --- a/server/website/website/db/base/target_objective.py +++ b/server/website/website/db/base/target_objective.py @@ -95,7 +95,7 @@ class UserDefinedTargetObjective(BaseTargetObjective): self.pprint = pprint def compute(self, metrics, observation_time): - return metrics[self.name] + return metrics.get(self.name, 0) class TargetObjectives: LESS_IS_BETTER = LESS_IS_BETTER