Skip to content

Commit c3c1056

Browse files
authored
Merge pull request #1395 from jmleddy/release-0.8
Fix nil pointer reference in GetStatus()
2 parents 661fcba + 019f54e commit c3c1056

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,8 @@ func (s *objectiveServer) GetStatus(ctx context.Context, req *connect.Request[ob
849849
statuses[v.Metric.Fingerprint()] = &objectivesv1alpha1.ObjectiveStatus{
850850
Labels: objectiveLabels,
851851
Availability: &objectivesv1alpha1.Availability{
852-
Percentage: 1 - (s.Availability.Errors / s.Availability.Total),
852+
Percentage: 0,
853+
Errors: float64(v.Value),
853854
Total: float64(v.Value),
854855
},
855856
}

0 commit comments

Comments
 (0)