Skip to content

Commit

Permalink
Merge pull request #1395 from jmleddy/release-0.8
Browse files Browse the repository at this point in the history
Fix nil pointer reference in GetStatus()
  • Loading branch information
metalmatze authored Jan 28, 2025
2 parents 661fcba + 019f54e commit c3c1056
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,8 @@ func (s *objectiveServer) GetStatus(ctx context.Context, req *connect.Request[ob
statuses[v.Metric.Fingerprint()] = &objectivesv1alpha1.ObjectiveStatus{
Labels: objectiveLabels,
Availability: &objectivesv1alpha1.Availability{
Percentage: 1 - (s.Availability.Errors / s.Availability.Total),
Percentage: 0,
Errors: float64(v.Value),
Total: float64(v.Value),
},
}
Expand Down

0 comments on commit c3c1056

Please sign in to comment.