From 2b758691e9868d072290d492e574ddb994e0cf02 Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Mon, 30 Sep 2019 16:35:57 +0200 Subject: [PATCH] clients: ensuring the user agent is set even if there's no partner id The check for `partner_id` happens within the setUserAgent function so we can instead delegate to that and ensure this is always set --- azurerm/internal/common/client_options.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/azurerm/internal/common/client_options.go b/azurerm/internal/common/client_options.go index fed2932e0ea3..7ff752b978c2 100644 --- a/azurerm/internal/common/client_options.go +++ b/azurerm/internal/common/client_options.go @@ -33,9 +33,7 @@ type ClientOptions struct { } func (o ClientOptions) ConfigureClient(c *autorest.Client, authorizer autorest.Authorizer) { - if o.PartnerId != "" { - setUserAgent(c, o.PartnerId) - } + setUserAgent(c, o.PartnerId) c.Authorizer = authorizer c.Sender = sender.BuildSender("AzureRM")