From 4f21851d0374470b5ac108787fc664f56a5cabdd Mon Sep 17 00:00:00 2001 From: "duck." Date: Tue, 7 May 2024 18:21:40 +0100 Subject: [PATCH] tariff/octopus: fix handling of deprecated config flag "tariff" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #13786 - you saw nothing 🤫 --- tariff/octopus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tariff/octopus.go b/tariff/octopus.go index 1a496573ad..eb69484a70 100644 --- a/tariff/octopus.go +++ b/tariff/octopus.go @@ -48,7 +48,7 @@ func NewOctopusFromConfig(other map[string]interface{}) (api.Tariff, error) { if cc.Region == "" { return nil, errors.New("missing region") } - if cc.Tariff == "" { + if cc.Tariff != "" { // deprecated - copy to correct slot and WARN logger.WARN.Print("'tariff' is deprecated and will break in a future version - use 'productCode' instead") cc.ProductCode = cc.Tariff