Forráskód Böngészése

support nil pvWithCost

AjayTripathy 7 éve
szülő
commit
c2179ca69c
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      costmodel/costmodel.go

+ 3 - 0
costmodel/costmodel.go

@@ -569,6 +569,9 @@ func GetPVCost(pv *costAnalyzerCloud.PV, kpv *v1.PersistentVolume, cloud costAna
 	if err != nil {
 		return err
 	}
+	if pvWithCost == nil {
+		return nil
+	}
 	pv.Cost = pvWithCost.Cost
 	return err
 }