changeset 895:3bb275235c89

Let GeoJSONMultiLineCoordinatesZ be nil when scanned from DB.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 02 Oct 2018 16:00:04 +0200
parents 1cd749dcb6a3
children b3c18ced286c
files pkg/models/cross.go
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/models/cross.go	Tue Oct 02 14:47:47 2018 +0200
+++ b/pkg/models/cross.go	Tue Oct 02 16:00:04 2018 +0200
@@ -346,6 +346,9 @@
 }
 
 func (mls *GeoJSONMultiLineCoordinatesZ) Scan(src interface{}) error {
+	if src == nil {
+		return nil
+	}
 	data, ok := src.([]byte)
 	if !ok {
 		return errNoByteSlice