AjayTripathy 7 лет назад
Родитель
Сommit
c2179ca69c
1 измененных файлов с 3 добавлено и 0 удалено
  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
 }