Return err

This commit is contained in:
2025-01-02 19:27:56 +01:00
parent a9278366dd
commit ca824726b4

View File

@ -2,7 +2,6 @@ package models
import ( import (
"database/sql" "database/sql"
"fmt"
"time" "time"
) )
@ -105,7 +104,7 @@ func (e *ElectionModel) GetById(id int) (*Election, error) {
} }
if err := rows.Err(); err != nil { if err := rows.Err(); err != nil {
return nil, fmt.Errorf("error iterating over choices for election ID %d: %v", id, err) return nil, err
} }
return election, nil return election, nil