fix:#26 old nbsp check in fetcher v1

This commit is contained in:
Elmar Kresse
2024-02-02 01:46:48 +01:00
parent 5b45621ed1
commit 6c3cbf35d6
3 changed files with 13 additions and 12 deletions

View File

@@ -8,6 +8,7 @@ import (
"htwkalender/model"
"htwkalender/service/date"
"htwkalender/service/fetch"
"htwkalender/service/functions"
"regexp"
"strconv"
"strings"
@@ -17,7 +18,7 @@ import (
func ReplaceEmptyEventNames(groups []model.SeminarGroup) []model.SeminarGroup {
for i, group := range groups {
for j, event := range group.Events {
if event.Name == "" {
if functions.OnlyWhitespace(event.Name) {
groups[i].Events[j].Name = "Sonderveranstaltungen"
}
}