Fix undefined variable errr
This commit is contained in:
parent
c5440eb931
commit
632f476092
2 changed files with 4 additions and 4 deletions
|
|
@ -302,7 +302,7 @@ func (s Survey) GetScore(u *User) (score *float64, err error) {
|
|||
}
|
||||
|
||||
func (s Survey) GetScores() (scores map[int64]*float64, err error) {
|
||||
if rows, errr := DBQuery("SELECT id_user, SUM(score)/COUNT(*) FROM student_scores WHERE id_survey=? GROUP BY id_user", s.Id); err != nil {
|
||||
if rows, errr := DBQuery("SELECT id_user, SUM(score)/COUNT(*) FROM student_scores WHERE id_survey=? GROUP BY id_user", s.Id); errr != nil {
|
||||
return nil, errr
|
||||
} else {
|
||||
defer rows.Close()
|
||||
|
|
|
|||
Reference in a new issue