changeset 1195:486d66a9565c

Be aware that the signer is null till the final decision is made about an import.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 18 Nov 2018 18:44:22 +0100
parents 7db850de0952
children a397b52981b8
files pkg/controllers/importqueue.go
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/importqueue.go	Sun Nov 18 18:29:25 2018 +0100
+++ b/pkg/controllers/importqueue.go	Sun Nov 18 18:44:22 2018 +0100
@@ -161,6 +161,8 @@
 
 	imports := make([]*models.Import, 0, 20)
 
+	var signer sql.NullString
+
 	for rows.Next() {
 		var it models.Import
 		if err = rows.Scan(
@@ -169,10 +171,13 @@
 			&it.Enqueued,
 			&it.Kind,
 			&it.User,
-			&it.Signer,
+			&signer,
 		); err != nil {
 			return
 		}
+		if signer.Valid {
+			it.Signer = signer.String
+		}
 		imports = append(imports, &it)
 	}