From 0ae0ad9e8227a1839cf2158511d886a305b2cb47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Fjukstad?= Date: Wed, 30 Nov 2016 15:47:59 -0500 Subject: [PATCH] school name bugfix thanks for the heads up Mona! :) --- kodetimen.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kodetimen.go b/kodetimen.go index ed57d77..fe004ee 100644 --- a/kodetimen.go +++ b/kodetimen.go @@ -51,7 +51,7 @@ func getRegisteredSchools() ([]RegisteredSchool, error) { for _, school := range allNorwegianSchools { reg := false for i, registered := range registeredSchools { - if strings.Contains(school.Name, registered.School) && registered.Locality == school.MunicipalityName { + if registered.School != "" && strings.Contains(school.Name, registered.School) && registered.Locality == school.MunicipalityName { reg = true // remove from slice so we don't add it later on registeredSchools[i].School = ""