Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Adds default value for a float rule handling
Browse files Browse the repository at this point in the history
Fixes bug where float rule defaults were not being converted correctly.
  • Loading branch information
IRCody committed Sep 30, 2016
1 parent 35ead3a commit bd25750
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion control/plugin/rpc/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func ToConfigPolicy(reply *GetConfigPolicyReply) *cpolicy.ConfigPolicy {
var fr *cpolicy.FloatRule
var err error
if val.HasDefault {
fr, err = cpolicy.NewFloatRule(key, val.Required)
fr, err = cpolicy.NewFloatRule(key, val.Required, val.Default)
} else {

fr, err = cpolicy.NewFloatRule(key, val.Required)
Expand Down

0 comments on commit bd25750

Please sign in to comment.