changeset 825:a5452a001b46

Added missing error check in surveys controller.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 27 Sep 2018 21:30:52 +0200
parents 221e64cb0c82
children 90a601884ff2
files pkg/controllers/surveys.go
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/surveys.go	Thu Sep 27 21:27:07 2018 +0200
+++ b/pkg/controllers/surveys.go	Thu Sep 27 21:30:52 2018 +0200
@@ -44,6 +44,10 @@
 		surveys = append(surveys, survey)
 	}
 
+	if err = rows.Err(); err != nil {
+		return
+	}
+
 	jr = JSONResult{
 		Result: struct {
 			Surveys []models.Survey `json:"surveys"`