From a21605bd96db9b7a4d3247718abf4f9ca1cf7599 Mon Sep 17 00:00:00 2001 From: Shyam Radhakrishnan Date: Mon, 11 Sep 2023 19:48:31 +0530 Subject: [PATCH] Fix reconciliation comparisons when there are no NSGs (#329) * Fix reconciliation comparisons when there are no NSGs --- SECURITY.md | 2 +- cloud/scope/util.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index fb238413..2ca81027 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -21,7 +21,7 @@ security features are welcome on GitHub Issues. Security updates will be released on a regular cadence. Many of our projects will typically release security fixes in conjunction with the -[Oracle Critical Patch Update][3] program. Additional +Oracle Critical Patch Update program. Additional information, including past advisories, is available on our [security alerts][4] page. diff --git a/cloud/scope/util.go b/cloud/scope/util.go index 01310e74..9ffbe788 100644 --- a/cloud/scope/util.go +++ b/cloud/scope/util.go @@ -26,6 +26,9 @@ const ( // GetNsgNamesFromId returns the names of the NSGs with the provided IDs func GetNsgNamesFromId(ids []string, nsgs []*infrastructurev1beta2.NSG) []string { + if len(ids) == 0 { + return nil + } names := make([]string, 0) for _, id := range ids { for _, nsg := range nsgs {