Explorar o código

make sure default pricing errors are handled

AjayTripathy %!s(int64=6) %!d(string=hai) anos
pai
achega
4f82cfdeba
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      cloud/gcpprovider.go

+ 3 - 3
cloud/gcpprovider.go

@@ -86,12 +86,12 @@ func (gcp *GCP) GetLocalStorageQuery() (string, error) {
 
 func (gcp *GCP) GetConfig() (*CustomPricing, error) {
 	c, err := GetDefaultPricingData("gcp.json")
-	if c.Discount == "" {
-		c.Discount = "30%"
-	}
 	if err != nil {
 		return nil, err
 	}
+	if c.Discount == "" {
+		c.Discount = "30%"
+	}
 	return c, nil
 }