Skip to content

Commit 8f61789

Browse files
Always pick nodes when org filter is specified (#202)
like sites, always pick if org specified
1 parent d590971 commit 8f61789

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

heartbeat/location.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ func pickTargets(service string, sites []site) *TargetInfo {
285285

286286
func alwaysPick(opts *NearestOptions) bool {
287287
// Sites do not need further filtering if the query is already requesting
288-
// only virtual machines or a specific set of sites.
289-
return opts.Type == "virtual" || len(opts.Sites) > 0
288+
// only virtual machines or a specific set of sites or a specific org.
289+
return opts.Type == "virtual" || len(opts.Sites) > 0 || opts.Org != ""
290290
}
291291

292292
// pickWithProbability returns true if a pseudo-random number in the interval

0 commit comments

Comments
 (0)