do not copy the role in here

This commit is contained in:
davidnewhall2 2020-02-03 00:06:41 -08:00
parent 3259ab1b73
commit ab34f5b221
1 changed files with 4 additions and 2 deletions

View File

@ -173,7 +173,7 @@ func (u *InputUnifi) setDefaults(c *Controller, useDefaults bool) {
c.URL = defaultURL
}
if c.Role == defaultURL {
if c.Role == "" {
c.Role = c.URL
}
@ -201,7 +201,9 @@ func (u *InputUnifi) setDefaults(c *Controller, useDefaults bool) {
c.URL = u.Default.URL
}
if c.Role == "" {
if c.Role == "" && u.Default.Role != u.Default.URL {
c.Role = u.Default.Role
} else if c.Role == "" {
c.Role = c.URL
}