diff --git a/pkg/compliance/http_routes.go b/pkg/compliance/http_routes.go index 68d7575c5..bb97e93db 100644 --- a/pkg/compliance/http_routes.go +++ b/pkg/compliance/http_routes.go @@ -5736,7 +5736,7 @@ func (h *HttpHandler) GetBenchmarkAssignments(echoCtx echo.Context) error { var status api.BenchmarkAssignmentStatus if benchmark.AutoAssign { status = api.BenchmarkAssignmentStatusAutoEnable - } else if len(results) > 0 { + } else if assignedCount > 0 { status = api.BenchmarkAssignmentStatusEnabled } else { status = api.BenchmarkAssignmentStatusDisabled