From ab34f5b2212b0c20925e3f0db422e6c74b482108 Mon Sep 17 00:00:00 2001 From: davidnewhall2 Date: Mon, 3 Feb 2020 00:06:41 -0800 Subject: [PATCH] do not copy the role in here --- integrations/inputunifi/input.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integrations/inputunifi/input.go b/integrations/inputunifi/input.go index dc97acf5..93f5c766 100644 --- a/integrations/inputunifi/input.go +++ b/integrations/inputunifi/input.go @@ -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 }