|
|
@@ -125,7 +125,6 @@ func (pc *ProviderConfig) Update(updateFunc func(*CustomPricing) error) (*Custom
|
|
|
if err != nil {
|
|
|
return c, err
|
|
|
}
|
|
|
- cj = sanitizePolicy.SanitizeBytes(cj)
|
|
|
err = ioutil.WriteFile(pc.configPath, cj, 0644)
|
|
|
|
|
|
if err != nil {
|
|
|
@@ -191,6 +190,7 @@ func SetCustomPricingField(obj *CustomPricing, name string, value string) error
|
|
|
}
|
|
|
|
|
|
structFieldType := structFieldValue.Type()
|
|
|
+ value = sanitizePolicy.Sanitize(value)
|
|
|
val := reflect.ValueOf(value)
|
|
|
if structFieldType != val.Type() {
|
|
|
return fmt.Errorf("Provided value type didn't match custom pricing field type")
|