Skip to content
Snippets Groups Projects
Commit 7b8f48b4 authored by Jano Hendriks's avatar Jano Hendriks
Browse files

Make province comparison case-insensitive

parent 064279bb
Branches
Tags v1.145.0
No related merge requests found
......@@ -237,11 +237,11 @@ func CleanZone(countryToClean, zoneToClean *string) (newCountry, newZone *string
}
if *newCountry == "South Africa" && zoneToClean != nil {
zone := *zoneToClean
zone := string_utils.RemoveAllWhiteSpaces(*zoneToClean)
for provinceCode, province := range Provinces {
for _, name := range province.Names {
if zone == name {
if strings.ToLower(zone) == strings.ToLower(string_utils.RemoveAllWhiteSpaces(name)) {
zone = string_utils.ReplaceCaseInsensitive(zone, name, provinceCode)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment