Skip to content

Commit

Permalink
Check DC is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
lkysow committed Mar 16, 2020
1 parent 0c3541c commit d741d6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subcommand/server-acl-init/create_or_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (c *Command) createACL(name, rules string, localToken bool, dc string, cons
policyName += fmt.Sprintf("-%s", dc)
}
var datacenters []string
if localToken {
if localToken && dc != "" {
datacenters = append(datacenters, dc)
}
policyTmpl := api.ACLPolicy{
Expand Down

0 comments on commit d741d6a

Please sign in to comment.