🩹 Load empty electors correctly

This commit is contained in:
Brian Wiborg 2024-05-13 01:52:19 +02:00
parent 116eb4604a
commit e7c9214afa
No known key found for this signature in database
GPG Key ID: BE53FA9286B719D6

View File

@ -59,7 +59,11 @@ func GetVoting(id string) (*voting.Voting, error) {
if t, err = threshold.FromString(dbThreshold); err != nil { if t, err = threshold.FromString(dbThreshold); err != nil {
return nil, err return nil, err
} }
e = strings.Split(dbElectors, " ") for _, _e := range strings.Split(dbElectors, " ") {
if _e != "" {
e = append(e, _e)
}
}
votes, err := getVotes(id) votes, err := getVotes(id)
if err != nil { if err != nil {