Skip to content

Commit

Permalink
fix(provider/gce): Tolerate locations with no CpuPlatforms entry. (#2487
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jtk54 authored Apr 5, 2018
1 parent 8386dc9 commit bb463ed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class StandardGceAttributeValidator {
}

def validateMinCpuPlatform(String minCpuPlatform, String location, GoogleNamedAccountCredentials credentials) {
if (!credentials.locationToCpuPlatformsMap[location].contains(minCpuPlatform)) {
if (!credentials.locationToCpuPlatformsMap[location]?.contains(minCpuPlatform)) {
errors.rejectValue("minCpuPlatform", "${context}.minCpuPlatform.invalid", "CPU platform $minCpuPlatform is not available in $location.")
}
}
Expand Down

0 comments on commit bb463ed

Please sign in to comment.