This commit is contained in:
David Kocher
2025-01-26 22:05:29 +01:00
parent 2bd5bbbb8f
commit 1748e8e4ec
2 changed files with 8 additions and 0 deletions
@@ -355,6 +355,10 @@ public abstract class AbstractProtocol implements Protocol {
@Override
public Set<Location.Name> getRegions() {
final String region = this.getRegion();
if(StringUtils.isNotBlank(region)) {
return this.toLocations(Collections.singletonList(region));
}
return Collections.emptySet();
}
@@ -457,6 +457,10 @@ public class Profile implements Protocol {
public Set<Location.Name> getRegions() {
final List<String> regions = this.list(REGIONS_KEY);
if(regions.isEmpty()) {
final String region = this.getRegion();
if(StringUtils.isNotBlank(region)) {
return parent.toLocations(Collections.singletonList(region));
}
return parent.getRegions();
}
return parent.toLocations(regions);