From ce7415e7afd305130cd1c1c3126b7b2d52ee416b Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Wed, 24 Apr 2024 16:23:31 -0500 Subject: [PATCH] fix: bad logic in domain lookup Signed-off-by: Doug Goldstein --- cmd/webhook/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/webhook/main.go b/cmd/webhook/main.go index 3c6ee57..5cbd22c 100644 --- a/cmd/webhook/main.go +++ b/cmd/webhook/main.go @@ -281,7 +281,7 @@ func loadDomainId(service *gophercloud.ServiceClient, domainName string) (string return domId, fmt.Errorf("unable to fetch domains in rackspace account: %v", listErr) } - if domId != "" { + if domId == "" { return domId, fmt.Errorf("failed to find domain `%s`", domainName) }