diff --git a/apis/keda/v1alpha1/scaledobject_types.go b/apis/keda/v1alpha1/scaledobject_types.go index 90ae3b9632c..e09e9859a46 100644 --- a/apis/keda/v1alpha1/scaledobject_types.go +++ b/apis/keda/v1alpha1/scaledobject_types.go @@ -277,11 +277,7 @@ func (so *ScaledObject) CheckReplicasNotNegative(replicas ...int32) bool { // GetIdleReplicasIfDefined returns bool based on whether idleRelicas is defined func (so *ScaledObject) GetIdleReplicasIfDefined() bool { - if so.Spec.IdleReplicaCount != nil { - return true - } - return false -} + return so.Spec.IdleReplicaCount != nil // checkReplicaCountBoundsAreValid checks that Idle/Min/Max ReplicaCount defined in ScaledObject are correctly specified // i.e. that Min is not greater than Max or Idle greater or equal to Min