Mercurial > gemma
comparison pkg/imports/wg.go @ 4497:ca7f9c56697a
WG import: "End date not after start date" is an hard error.
As this leads to data not being imported it should be marked as Error
(not Warning) in the Logs).
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Mon, 30 Sep 2019 13:41:39 +0200 |
parents | 5d7ce7f926eb |
children | ca6a5f722471 |
comparison
equal
deleted
inserted
replaced
4496:8c98d801e62e | 4497:ca7f9c56697a |
---|---|
234 feedback.Info("Processing %s", code) | 234 feedback.Info("Processing %s", code) |
235 | 235 |
236 // We need a valid, non-empty time range to identify gauge versions | 236 // We need a valid, non-empty time range to identify gauge versions |
237 if dr.Enddate != nil && dr.Startdate != nil && | 237 if dr.Enddate != nil && dr.Startdate != nil && |
238 !time.Time(*dr.Enddate).After(time.Time(*dr.Startdate)) { | 238 !time.Time(*dr.Enddate).After(time.Time(*dr.Startdate)) { |
239 feedback.Warn("End date not after start date") | 239 feedback.Error("End date not after start date") |
240 unchanged++ | 240 unchanged++ |
241 continue | 241 continue |
242 } | 242 } |
243 | 243 |
244 var from, to sql.NullInt64 | 244 var from, to sql.NullInt64 |