diff pkg/models/cross.go @ 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 e10a8a682297
children a244b18cb916
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