Remove team's initial_name, replaced by their ID

This commit is contained in:
nemunaire 2018-01-21 14:07:44 +01:00
parent 191c89f7ad
commit e083da2f72
9 changed files with 26 additions and 65 deletions

View file

@ -7,6 +7,7 @@ import (
"math/rand"
"os"
"path"
"strconv"
"strings"
"time"
@ -142,7 +143,9 @@ func treat(raw_path string) {
if len(spath) == 3 {
if spath[1] == "_registration" {
treatRegistration(raw_path, spath[2])
} else if team, err := fic.GetTeamByInitialName(spath[1]); err != nil {
} else if teamid, err := strconv.Atoi(spath[1]); err != nil {
log.Println("[ERR]", err)
} else if team, err := fic.GetTeam(teamid); err != nil {
log.Println("[ERR]", err)
} else if spath[2] == "name" {
treatRename(raw_path, team)