diff pkg/imports/st.go @ 1911:6ffc372cde1e

Fixed JSON serialization of ISRS codes.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 18 Jan 2019 17:50:25 +0100
parents 32c56e6c089a
children a24d3b4b7ccd
line wrap: on
line diff
--- a/pkg/imports/st.go	Fri Jan 18 17:17:36 2019 +0100
+++ b/pkg/imports/st.go	Fri Jan 18 17:50:25 2019 +0100
@@ -141,7 +141,7 @@
 // CleanUp of a stretch import is a NOP.
 func (*Stretch) CleanUp() error { return nil }
 
-// Do executes the actual bottleneck import.
+// Do executes the actual stretch import.
 func (st *Stretch) Do(
 	ctx context.Context,
 	importID int64,
@@ -151,6 +151,10 @@
 
 	start := time.Now()
 
+	if st.Date.Time.IsZero() {
+		st.Date = models.Date{start}
+	}
+
 	feedback.Info("Storing stretch '%s'", st.Name)
 
 	if len(st.Countries) == 0 {