Skip to content
Snippets Groups Projects
Commit f5320f2e authored by Francé Wilke's avatar Francé Wilke
Browse files

Add a check for a province code match

parent f0c7d7c6
No related branches found
No related tags found
No related merge requests found
...@@ -242,7 +242,8 @@ func CleanZone(countryToClean, zoneToClean *string) (newCountry, newZone *string ...@@ -242,7 +242,8 @@ func CleanZone(countryToClean, zoneToClean *string) (newCountry, newZone *string
for provinceCode, province := range Provinces { for provinceCode, province := range Provinces {
found := false found := false
for _, name := range province.Names { for _, name := range province.Names {
if strings.ToLower(zone) == strings.ToLower(string_utils.RemoveAllWhiteSpaces(name)) { if strings.ToLower(zone) == strings.ToLower(string_utils.RemoveAllWhiteSpaces(name)) ||
strings.ToLower(zone) == strings.ToLower(provinceCode) {
zone = provinceCode zone = provinceCode
found = true found = true
break break
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment