Skip to content

Commit

Permalink
Confirm regions filter isnt empty
Browse files Browse the repository at this point in the history
  • Loading branch information
michellescripts committed Feb 10, 2025
1 parent 5944edd commit 031e340
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/web/integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ func (h *Handler) integrationDiscoveryRules(w http.ResponseWriter, r *http.Reque
startKey := values.Get("startKey")
resourceType := values.Get("resourceType")
regionsFilter := values["regions"]
// the regions key is always sent as a query param but is not always populated (&regions=)
// this results in a slice containing a single empty string
if len(regionsFilter) == 1 && regionsFilter[0] == "" {
regionsFilter = nil
}

clt, err := sctx.GetUserClient(r.Context(), site)
if err != nil {
Expand Down

0 comments on commit 031e340

Please sign in to comment.